Hi

I'm Sean.

I write about #software, #SaaS, #consulting and #mobile app development

I code in #Python, #PHP, #Swift, #Ruby, #ReactJS and #Postgres


Random Blog Posts See more posts

Email Regex
Regular Expression that Matches Email Addresses: /\b[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}\b/
Written by Sean Behan on 06/17/2012
Git Feature Branch Naming Strategy
There are only two hard things in Computer Science: cache invalidation and naming things. -- Phil Karlton Typically, we have three main branches at any given time in a project lifecycle. master, development and staging. Master is production ready code, d...
Written by Sean Behan on 06/17/2012
Renaming Routes in Rails 3 with :As and :Controller
Renaming routes in Rails 2.* is straight forward. It goes something like this. ## config/routes.rb map.resources :users, :as => :members This will give you users_path and form_for(User.new) helpers, for instance, mapping the url to /members instead of ...
Written by Sean Behan on 06/17/2012
Why are PHP5 Namespaces Defined Using a Backslash?
Why are PHP namespaces defined using a backslash? It looks ugly. Unless of course, there is a good reason for the "\"? Does this namespaced code run more efficiently on Windows? Since namespaces are new in PHP5 why not take the opportunity to use them wh...
Written by Sean Behan on 06/17/2012
A Through Z
How to print the alphabet in Rails very easily. ("A".."Z").each {|letter| link_to letter, "/#{letter"} "A".upto("Z") {|letter| link_to letter, "/#letter"}
Written by Sean Behan on 06/17/2012