Useful bits of code for my web experiments