add sample code to README and docs/index

This commit adds a sample code to the splash pages of the project.

The code sample is intended to make it slightly easier to grasp what exactly
twosheds is.