depicus

changing the digital world one bit at a time...

Blants (noun) the rants of a blogger

  1. Wake on Lan for OS X updated in the Mac App Store

    June 29, 2011 by The Man

    Wake on Lan for OS X has had a bit of a face lift and it now live in the Mac App Store. More improvements to come….


  2. Writing to OS X ~/Library/Logs from your app

    June 18, 2011 by The Man

    In your main.m file just amend to look like the following.

    #import 
    
    int main(int argc, char *argv[]) {
        
        id pool = [NSAutoreleasePool new];
    	NSString *logPath = [NSHomeDirectory() stringByAppendingPathComponent:@"Library/Logs/Depicus"];
    	freopen([logPath fileSystemRepresentation], "a", stderr);
    	[pool release];
        
        return NSApplicationMain(argc,  (const char **) argv);
    }
    

  3. Adding a GIT repository to an existing XCode 4 project

    May 28, 2011 by The Man

    Simple really.

    1. Close XCode 4
    2. Open Terminal and cd to your project folder
    3. Type git init
    4. Then git add .
    5. And finally git commit -m “First commit of XCode project”

    Reopen XCode and fingers crossed you are now all GITed up.

    The original article is here


  4. Using SNMP on Mac OS X Snow Leopard

    February 16, 2011 by The Man

    Start SNMP

    sudo launchctl load -w /System/Library/LaunchDaemons/org.net-snmp.snmpd.plist

    Query SNMP

    snmpwalk -v 2c -c public 192.168.0.4

    Easy 🙂


  5. How to repair multiple entries in “Open With” menu on OSX

    January 23, 2011 by The Man

    Ever open the “Open With” and seen multiple entries for the same program ? Here is how to fix this problem.

    Open the Terminal and paste in this code

    /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -r -domain local -domain system -domain user
    

    Then reboot and voila….