Collection of useful bits of javascript