Various bits of ruby code, while I learn the language