Sample code from my pingconf 2013 talk