Code from a presentation I gave at the 2014-07-30 CodeCraft meetup