A (growing) collection of handy Google Apps Script code snippets.
To learn how to use Apps Script, check this quick tutorial, the homepage, and the docs.