Chrome and PPAPI Flash Audio Syncing Bug

In a somewhat Microsoftian move, Google decided to change the standard browser plugin architecture called NPAPI for Chrome and bundle a custom port of Flash which uses it. Sadly, this has lead to some differences for that version of Flash and, unfortunately, new bugs.

Eigen, GLM and CML: Math Lib Performance on iOS

At the moment I’m playing around with writing a cross platform game library, because that’s what all the cool kids are doing. One of the parts I’m not particularly looking forward to is writing a math library for the rendering. Fortunately, far greater programmers than I have done so already. In fact, many greater programmers have. Three seem quite popular: CML, Eigen and GLM.

Easy_install and Broken Setuptools on OS X

After upgrading to Mountain Lion, easy_install seemed to be borked. On running it, this happened:

$ easy_install Pygments
Traceback (most recent call last):
  File "/usr/local/bin/easy_install", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 2607, in <module>
    parse_requirements(__requires__), Environment()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 565, in resolve
    raise DistributionNotFound(req)  # XXX put more info here
pkg_resources.DistributionNotFound: setuptools==0.6c12dev-r85381

Lazy One Liners: ‘Git Rm’ All Deleted Files

[UPDATE] My git skills are weak. You can achieve this much more simply by typing: git add -A. Still, knowing about the --porcelain option is useful. Honest.

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.