RUBY's sample code for snapplab