Code snippets for the sciencegeekery.com blog