Feb 24
2011
I use vim with a tab autocompletion macro, and sometimes I really do want to insert a tab character and autocompletion gets in the way.
Today I found out that if I hold down shift and hit tab, a tab is inserted and tab autocompletion doesn't get triggered. Prior to …
Jan 27
2011
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 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 …
Jan 16
2011
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 …
Dec 16
2010
It took a month and a bit, but Pulse-o-matic is finally on the App Store. For my loyal followers (all 3 of you), email me for a promotion code :)
Cheers,
Steve
Sep 21
2010
I would like to start this post off by saying that emotionally I agree with the sentiment that HTML is not a programming language. Intellectually, however, my position is that HTML is a programming language.
My argument for HTML as a programming language is very abstract, and to put it …
Jun 09
2010
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 …
Jan 05
2010

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 …
Dec 31
2009
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 …
Oct 11
2009
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
gnuplot can be used to fit a fourier series to a series of data points. In my case it was an observation log for the star BE Lyncis from the Bossom Observatory, curtsey of Geir Klingenberg.
Firstly one needs to define a time function t(x) such that as x …
Sep 09
2009
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 …
Aug 05
2009
Annoyingly git-daemon-run requires runit on debian, but runit will fail to install properly in a debian vserver because it doesn't have init.
One solution is to reconfigure vserver to use plain init style.
However I didn't want to this because I don't want to take down my vserver just yet …
Jul 29
2009
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
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

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
[

](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
Ever since I got my 2nd monitor, I been using VNC to work on my laptop. Leopard's inbuilt VNC server isn't really VNC compliant, and has many issues when used with a normal VNC client. I have found Vine server to be an excellent replacement. The client side is a …
Jul 31
2008
If iwconfig wlan0 essid blah is seemingly not working when connecting to a open wireless network, then try
-
iwconfig wlan0 essid blah
-
iwconfig wlan0 key open
-
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
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 …