Some commonly used and useful code snippets