Some Ruby snippets