Update snippets.

Kudos @jtsternberg for original snippets which these are based on.