Useful pieces of code I've collected over the years. All Public Domain.