Handy Ruby snippets