Some useful code snippets and demos, mostly for my own reference, but here in case they help anyone else.