A collection of useful code snippets that I have found on the internet and "improved"