A collection of useful JavaScript patterns