Skip to the content
  • GitHub Profile
  • Instagram Profile
  • LinkedIn Profile
  • Spotify Profile
Chris Bloom
Software Engineer, Mentor, Leader
  • About Me
    • My Resume
  • Contact
  • Favorite Quotes
  • Posts
    • Backposts
    • Code Snippets
    • Consulting & Freelancing
    • Miscellaneous
    • Personal Notes
    • Programming
    • Projects
    • Remote Work
    • Reviews
    • Unsolicited Advice
  • Home
  • Posts
  • Programming
  • Code Snippets
  • Page 2

Code Snippets

Small snippets of code that I find interesting or useful. Generally my own work, but I will cite sources if not.

Named redirect routes in Rails 3

I didn't see this mentioned anywhere in the Rails Guide or in my admittedly cursory Google searches, but apparently it's possible to create named redirect...
June 13, 2011June 13, 2011

It Should Include Only One Of – An RSpec Matcher

I know RSpec tests should typically be implementation/data agnostic, but I ran into a situation in a unit test where I needed to make sure...
June 11, 2011June 14, 2011

Join (implode) an Array of String Values with Formatting

In programming, I often need to join values together from an array. Typically this will be to do something on the backend, like join a...
May 21, 2011June 11, 2011

Find the longest common substring using PHP

I recently found a need to find the longest common substring in an array of strings in PHP. A couple of Google searches didn't return...
February 24, 2011June 13, 2011

Posts navigation

Newer posts
  • About Me
    • My Resume
  • Contact
  • Favorite Quotes
  • Posts
    • Backposts
    • Code Snippets
    • Consulting & Freelancing
    • Miscellaneous
    • Personal Notes
    • Programming
    • Projects
    • Remote Work
    • Reviews
    • Unsolicited Advice
  • GitHub Profile
  • Instagram Profile
  • LinkedIn Profile
  • Spotify Profile