- Detect if you’re running on Windows – Adds a method to Kernel called is_windows?
- Random Alphanumeric String Generator – Produces a random string of a chosen length using A-Za-z0-9.
- Full intersection between 2 arrays – Like ‘&’ but doesn’t remove duplicates in the original array.
- Call .sort with a block – Basic Ruby, but contains an extended section with an optimization and a to_proc version.
- Date.distance_to method – Gives you the distance between two dates in years, months, and days
- Match identical strings on the same line – Clever regex
- Quickly match first instance of a regex match
- Return ‘x’ random elements from an array – Extends the Array class with ‘randomly_pick’
- Non-persistent ActiveRecord – Lets you create AR models without a corresponding database table
- Ruby Object Creation Tracer – Tells you where your objects are being created in your program
- Basic OpenGL Ruby example – An interesting place to start if you want to get into graphics / OpenGL.