Journey's End

Feb 24
2011

Jan 27
2011

iPhone 4 layer export script for Gimp

I often mockup iPhone interfaces on the Gimp, then exporting each layer for use as backgrounds. For iOS 4 each image needs to be exported twice: one at full resolution with @2x in its filename, and once at half-resolution without the @2x. e.g. nav_bg@2x.png and nav_bg.png …

Jan 22
2011

Socket.IO Framing Protocol

Socket.IO is a great library and framework that doesn't seem to have a good description of the protocol available. In interest of helping others when they google "socket.io framing protocol", this post was born.

The description of the framing protocol used by Socket.IO below is taken from …

ts=14:55 tags=[software,code]

Jan 16
2011

UIGraphicsBeginImageContext on iPhone 4

I generate UIImages in some of my iOS applications, and prior to the iPhone 4 they all worked fine. With the introduction of the iPhone 4 and Retina Display, I realised my generated images were blurry even though I am rendering them at twice the resolution.

It turns out this …

ts=10:21 tags=[software,code]

Dec 16
2010

Sep 21
2010

Jun 09
2010

Script to make IPAs for ad-hoc distribution.

This script produces an IPA, then verifies to make sure the IPA is actually valid.

PRODUCT_NAME=""
IPA="\\({PRODUCT_NAME}.ipa" APP="\\).app"

if [ -z "\${PRODUCT_NAME}" ]; then
        echo "PRODUCT_NAME not set";
        exit 1;
fi

rm -rf ipa
mkdir -p ipa/Payload &&
cp -R build/Debug-iphoneos/\\({APP} ipa/Payload/ && pushd ipa && zip -q …

ts=05:22 tags=[software,code]

Jan 05
2010

Introducing GeoNote AR (2.0)

Some of you might know I have been working on a little iPhone app called GeoNote (iTunes link). Its basic goal is to allow you to annotate the real world by allowing you to leave little messages (notes) which are "pinned" to real world locations. These little messages are visible …

ts=10:53 tags=[software]

Dec 31
2009

Order Matters With XCode's Build Phrases

I use a custom script to insert the current git commit into GeoNote, so when I get bug reports I have a better idea of which version the user is running. The script is as below:

``` brush:c

import os from Foundation import NSMutableDictionary

version = os.popen4("/sw/bin/git …

ts=09:03 tags=[code,software,osx]

Oct 11
2009

qrbackup

I generated a gpg keypair for myself today, and I was looking for a fairly safe way to back it up. I don't particularly trust DVD/CDs, and keeping it on flash is even more worrying. I wanted a means of backup I can see and touch.

Paperbak would be …

Sep 21
2009

Sep 09
2009

Dealing with rkhunter warnings

rkhunter often warns on file property changes after upgrade and such, and sometimes you just aren't sure whether it is due to recent upgrades, or because you really were compromised. The following script was written to compare the checksum of all files rkhunter warns about against the originals in a …

ts=05:01 tags=[code,software,linux]

Aug 05
2009

Jul 29
2009

Facebook python authentication gateway

Edit: it occurred to me what I have below is the basics of a thin facebook api wrapper. I might make it into one at some point in the future.

If you don't know what this does, you don't need it. Hope this helps some one. Written because pyfacebook is …

Jun 03
2009

microbric viper review

The microbric viper is neat. Good quality parts and unique idea. Makes a decent robotics platform if you get the wheel add-on. However, you gotta have small fingers to get some of the parts in place. Despite this, the hardware is solid, I like it. The one thing I would …

Apr 28
2009

Stripping trailing whitespace from XCode

![](http://shuningbian.net/files/xcode_strip_trailing_whitespace_regex.jpg)

Firstly, my usual approach of s/\s+$//g doesn't work since it eats up the newline too. s/\s+$/\n/g doesn't work either because the Replace: field in the find dialogue doesn't escape the \n.

Final solution is as shown: s/[ \t]+$//g …

Dec 25
2008

DIY digital spirit level

[](http://www.flickr.com/photos/sentientintelligence/3134648563/ "photo sharing") [DIY digital spirit level](http://www.flickr.com/photos/sentientintelligence/3134648563/) Originally uploaded by [sentientintelligence](http://www.flickr.com/people/sentientintelligence/)

A simply digital spirit level using a LIS302DL accelerometer from nkcelectronics coupled with a seeeduino for processing and a 2x16 …

Sep 21
2008

Jul 31
2008

iwconfig not setting essid?

If iwconfig wlan0 essid blah is seemingly not working when connecting to a open wireless network, then try

  1. iwconfig wlan0 essid blah

  2. iwconfig wlan0 key open

  3. iwconfig wlan0 enc off

The above seems to work for me by turning off encryption. It would appear with encryption enabled, iwconfig won't work …

Jul 24
2008

grub, xfs, debian

Running grub-install with a XFS partition will likely fail - there is a reason lilo is used when XFS is root! The issue is grub-install creates the stage files in /boot/grub, which grub then expects to find when it accesses the disk directly using its own file system drivers. For …

← Previous Next → Page 3 of 4