2013 in review

The WordPress.com stats helper monkeys prepared a 2013 annual report for this blog.

Here’s an excerpt:

The concert hall at the Sydney Opera House holds 2,700 people. This blog was viewed about 12,000 times in 2013. If it were a concert at Sydney Opera House, it would take about 4 sold-out performances for that many people to see it.

Click here to see the complete report.

Posted in Uncategorized

Command line conversion of svg to png

Inkscape SVG plain

Here’s a little gem when you install Inkscape:

/Applications/Inkscape.app/Contents/Resources/bin/inkscape –export-png output.png -w 100 -h 100 noun_project_9206.svg

Tagged with: , , , , , , , , , , , ,
Posted in Code, Misc

Autobuild numbers in Xcode4

In Xcode 4 look in the Navigator pane, which is the pane on the left side of the Xcode screen. It has 7 icons across the top. Select the left-most icon (looks like a file folder) to get the Project Navigator pane.

Now click on the first item in that pane, which is the project itself. That opens a big window in the center with a narrow column to the left of it.

The narrow column has 2 sections: “PROJECT” AND “TARGETS”. Click on your project name in the “TARGETS” section. Now the center pane has 5 tabs along the top: “Summary”, “Info”, “Build Settings”, “Build Phases”, and “Build Rules”.

Click on the “Build Phases” tab. If your config is the same as mine you’ll now see 4 sections in the main window: “Target Dependencies”, “Copy Bundle Resources”, “Compile Sources”, and “Link…”. Click on “Add Build Phase” (at the lower right corner) and choose “Add Run Script”. A 5th section now appears in the center pane with the title “Run Script”. Drag the “Run Script” section up so it is the 2nd section from the top, just below “Target Dependencies”.

Now click on the disclosure triangle for the Run Script section. That opens a window where you can put a script. Copy and paste the following script into that window.

bN=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "$INFOPLIST_FILE")
bN=$(($bN + 1)) 
bN=$(printf "%d" $bN)
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $bN" "$INFOPLIST_FILE"

Be sure that “Run script only when installing” is NOT CHECKED.

That’s it! Now your build number auto-increments every time you build your project.

This script assumes you have a decimal build number in your Info.plist file and increments it as hex. The build number appears in Info.plist as “Bundle version”. The script doesn’t work if the build number is missing so be sure to enter a starting value. To enter a starting value go to the “Summary” tab in the same center pane you were using above and enter “1” (or whatever value you like) into the “Build” box (but not a formatted string like 1.0).

Tagged with: , , ,
Posted in Uncategorized

Splitview side bar hiding

So you have this splitview but you don’t want to show it all the time in landscape, but Apple never explained how to do that. Let’s make up on that:

First add some button logic in the app delegate:

– (IBAction)toggleSplitView:(id)sender {

    if ( [window.subviews containsObject:splitViewController.view] ) {

        [splitViewController.view removeFromSuperview];

        splitViewController.viewControllers = [NSArray arrayWithObjects:leftViewController, leftViewController, nil]; 

        [window addSubview:rightViewController.view];

        [(UIBarButtonItem *)sender setTitle:@”Show Sidebar”];

    } else {

        [rightViewController.view removeFromSuperview];

        [rightViewController.view setTransform:CGAffineTransformIdentity];

        [navigationController popToRootViewControllerAnimated:NO]; // make sure we are on top

        [navigationController setViewControllers:[NSArray arrayWithObject: leftViewController]];

        splitViewController.viewControllers = [NSArray arrayWithObjects:navigationController, rightViewController, nil]; 

        [window addSubview:splitViewController.view];

        [rightViewController.view sizeToFit];

        [(UIBarButtonItem *)sender setTitle:@”Hide Sidebar”];




In the controller that handles your right view (detail) add a item:

    UIBarItem *toggleSidebar;

@property (nonatomic, retain) IBOutlet UIBarItem *toggleSidebar;

Insert the control when the controller is triggered during hide and show:

– (void)splitViewController: (UISplitViewController*)svc willShowViewController:(UIViewController *)aViewController invalidatingBarButtonItem:(UIBarButtonItem *)barButtonItem {

    NSMutableArray *items = [[toolbar items] mutableCopy];

    [items removeObjectAtIndex:0];

    [items insertObject:toggleSidebar atIndex:0]; // add additional control for hiding

    [toolbar setItems:items animated:YES];

    [items release];

    self.popoverController = nil;


Add a button in the load view that triggers the AppDelegate:

    toggleSidebar = [[UIBarButtonItem alloc] initWithTitle:@”Hide sidebar”


                                                    target: [self appDelegate]


And don’t forget to put in in the toolbar 🙂

    [items insertObject:toggleSidebar atIndex:0];

// set the bar

    [toolbar setItems:items animated:YES];

Oh and hide it in the willHideController

Dealoc it when done:

– (void)dealloc {

    [popoverController release];

    [toolbar release];

    [toggleSidebar release];

    [super dealloc];



Posted in Uncategorized

Dagbani Proverb

Ghana - Trees Ghana Samsam Odumase community f...

Image by treesftf via Flickr

I’m brushing up my dagbani, here’s what I’ve learned today: Read more ›

Tagged with: , ,
Posted in Ghana

Vulcan child logic

Vulcan child?

This night I was putting my son (3) to bed and asked him if he was given his vitamins by his mother, he assured me that this was not the case. Knowing his appetite for the tablets I told him it was vital he told me the truth since eating four additional tablets would make his nose fall off. To which he replied: “in that case I’ll have three”.

I guess he has his mothers sense of bargaining and his fathers sense of humor 🙂

Tagged with: ,
Posted in Family

Outlook .pst to .mbox conversion

An Outlook express icon that I made from scrat...

Image via Wikipedia

You will probably have followed a zillion links before you got to this page and the only reason I am blogging about it is because most of these links will provide you with useless information or point you to software which will only export the first few files.

If you, like I, have collected thousands of emails in your trusted .pst folders on Microsoft Outlook and you (like I) are moving to another platform such as Apple, you will quickly notice that taking your mail with you is not such an easy thing. Read more ›

Tagged with: , , ,
Posted in Misc

Adding a jar to Eclipse for Android

Icon from Nuvola icon theme for KDE 3.x.

Image via Wikipedia

Importing a jar in Eclipse for my Android project gave me a little headache so I’ll copy/paste the instructions here below so others may not have to suffer the same. Credits go to stackoverflow.

Read more ›

Tagged with: ,
Posted in Code

Recorded Noa as TomTom Voice

TomTom Voices

I recently stumbled across this very interesting page. It explains in detail how to create your own TomTom voice, and so I set out for an evening with my daughter and Audacity to record our very own TomTom voice.

Read more ›

Tagged with: , , ,
Posted in Family

SeaMap US Released for iPad and IPhone

What is Sea Map?

Great detail

Sea Map is a map viewer that supports NOAA (www.noaa.gov) maps for planning and light navigation purposes.
The maps can be downloaded from the NOAA servers bringing you the freshest maps of the US waters to your device. Since you can select which maps to download you will never waste space on your device on maps you are not using.

What can and can’t you do with Sea Map?

Every mariner knows you should use certified charts for navigation, hence you should not rely on Sea Map to be your primairy and only source of chart material.
That beeing said, Sea Map is a great utility and with 5 different zoom levels you can get crispy clear details of every map that is out there, and by storing the maps on your device you can use SeaMaps when you do not have a data connection.

What Maps are used in Sea Map US?

Easy searching

Unlike it’s European counterpart SeaMap US uses the official NOAA raster charts. This means you have access to over 1700 charts covering the US, Alaska, Hawaii etc. It totals over 20Gb of chart data stored in over half a million files. You can select the maps you want and simply download them on your device.

How can I get a better/newer map?

We’ll do the hard work for you, and update our servers with the latest maps. All you need to do is download it.

Check it out in the AppStore

Tagged with:
Posted in Code, Luky Soft