Code Samples for SharePoint Client Side Opertaions

This is a note for myself so that I can easily find it.

SharePoint 2010 CSOM and JavaScript

SharePoint 2013 CSOM, JavaScript, and REST