Commit from gist

This was in the gist:
https://gist.github.com/maxfenton/515f9f6fcfab0eadfd1a