Collection of useful JS patterns