A simple contract in serpent that is similar to The Button on reddit where everyone pays a fixed amount of ether to call pressButton, and then if 3 blocks pass without someone calling pressButton, then whoever pressed the button last can call claimTreasure and get everyone's deposits.
Here are some resources:
- https://github.com/ethereum/wiki/wiki/Serpent
- https://mc2-umd.github.io/ethereumlab/docs/serpent_tutorial.pdf