This is a compilation of severals Javascript patterns that might be useful.