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

eagle in the sky at loon lodge 2008
Written by Sean Behan on 06/17/2012
How To Add A Route With A Forward Slash in Params with Rails 3 Application
Use an asterisk in the pattern to match for everything after it. In the example below, date will be available in the params hash as params[:date]. SPB::Application.routes.draw do # http://example.com/calendar/2007/10 # params[:date] => "2007/1...
Written by Sean Behan on 06/22/2012
Change database column names for form validations in Rails
When you use validations in Rails, db column names are used as 'keys' for error messages. This is usually the preferred way to go about it because this maps nicely to the form fields. However, if you use a virtual attribute this may not be the case. For e...
Written by Sean Behan on 06/17/2012
Linux Disk Usage Command Recursive
It's short and sweet! du -hs * If you run this command it will tell you the sizes of all the files and folder in the current directory. The `-h` flag is for human readable format and the `-s` will give you the size for each file or directory. ...
Written by Sean Behan on 03/07/2017
How to Extract all Images from a Webpage with Ruby
Here is a little ruby snippet that will download all pictures from a webpage. Rather than using XPath, we are going to first reduce the source code to capture everything inside of quotes. Some websites use JSON w/in a script tag to lazy load images an...
Written by Sean Behan on 08/01/2018