Various Code Snippets and useful functions.