Lazy One Liners: ‘Git Rm’ All Deleted Files

Deleted three hundred and seventy two files and forget to use git rm? This one liner will do it for you, if you run it from your repository root:

git status --porcelain | awk '/^.D .*$/ {print $2}' | xargs git rm

Throttling Bandwidth on OS X

Recently I started pushing a repository to GitHub only to find out it was a couple of GB in size. Due to my ISPs network connection being made of soiled tissue paper, dead earwigs and lost hope, it quickly saturated it. This interrupted watching Breaking Bad on Netflix. Clearly something had to be done.

Enter ipfw.

Clang Failed With Exit Code 1

Apple Mach-O Linker Error
Command /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/clang failed with exit code 1

Xcode 4 Bringing the Pain

Experiencing clang failing with no other error information?

Uncrustifying Objective-C Source in Xcode 4

K&R. Allman. BSD. Crazy Whitesmiths. No, it’s not a nu-punk-alt-country rock band, but a selection of common (well, sort of) code indent styles. Much blood has been spilled arguing over the merits of each.

I’m not brave enough to venture into that battlefield, but I can at least point the weary foot soldier towards the tent of General Uncrustify and his Marvellous Xcode Contraption.

VPN With Amazon EC2 or Saving Your Phone From Promiscuity

Modern mobile devices are a wonderful, especially when combined with some handy public WiFi hotspot. Unfortunately ne’er-do-wells abound so if you aren’t careful using public hotspots, people can poke around with your data packets and steal fun details like usernames and passwords. What is a mobile internet addict to do?

Simple! Setup up your own VPN. Here’s how to set one up on Amazon EC2, suitable for use with most smartphones and laptops.

Ludum Dare 22: Alone

My first venture into the world of programming competitions is beginning with Ludum Dare 22. I wonder if I’ll have anything finished by the end of it?

OS X Lion Terminal Colours

OS X is awesome for command line stuff, that’s why real programmers love it. But some of the defaults Apple have used make me sad. Where are all the colours? I demand my ls command be pretty and colourful! Why is Vim so bland? While we’re at it, can’t ping lick my eyeballs more?