Code accompanying a tutorial I wrote.