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

Blants (noun) the rants of a blogger

  1. Show the Library folder in Lion

    July 21, 2011 by The Man

    Just type chflags nohidden ~/Library in to Terminal… done

  2. Macbook Pro has no sound – red optical out light

    July 5, 2011 by The Man

    If your Macbook Pro has no sound (at all) and you cannot set the volume then check if your headphone speaker has a red light. If it does then you may need to poke a toothpick around to reset it. I kid you not.

    After a day at a clients listening to files via the headphones the sound had locked and in System Preferences > Sound > Output only had Digital Out. A quick wiggle inside with a toothpick and I heard a click and the red light went off and the sound came back on. Perfect.

  3. Kenya Dairy iPad app goes Open Source

    July 1, 2011 by The Man

    You can find the source code on Github and the Kenya Diary app itself is on iTunes

  4. 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….

  5. ‘Invalid content size ‘ADBannerContentSizeLandscape’ passed to ADAdSizeForBannerContentSize’

    June 21, 2011 by The Man

    If you are running an iPhone app on versions lower than 4.2 you may see this error ‘Invalid content size ‘ADBannerContentSizeLandscape’ passed to ADAdSizeForBannerContentSize’

    To fix (dirty) simply set the size when the view loads.

    - (void)viewDidLoad {
        if ([[[UIDevice currentDevice] systemVersion] doubleValue] < 4.2)
            adMain.requiredContentSizeIdentifiers = [NSSet setWithObject:ADBannerContentSizeIdentifier320x50];
            adMain.currentContentSizeIdentifier = ADBannerContentSizeIdentifier320x50;
        [super viewDidLoad];

  6. 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.

    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);