just a bunch of code chunks i've put together to help me through life (mostly ruby)