Introduce code that goes with the posts

Straight copy-paste from the articles, not sure it the code even compiles