Some ruby snippets