There are a ton of examples on the wiki (see the bottom of the right hand column and on this forum (e.g. this one).
As OH 2 becomes more mature and the new rules engine that Kai is working on becomes a reality we will then be able to create shareable generic rules. At that time I expect that a library of reusable rules will be created and a library of rules will be created which users can simply reuse as is instead of needing to use them as an example.