Javascript snippets I have used in various projects