Various bits of code from projects I'm working on.