Collection of useful js snippets