move and create some useful code snippets
Merge pull request #49 from z3a/master

Add some code snippets