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

How to Create a Slug in Python with the Re Module
There are a few 3rd party modules that do this sort of thing. But there is a pretty solution using out of the box Python functionality. You don't have to install any dependencies if you use the `re` module. import re text = ' asdfladf ljklasfj 2324...
Written by Sean Behan on 03/02/2017
Disk Usage Information on Mac OS X
Get disk usage information about the Desktop $ du -h -d 0 Desktop 14G Desktop Information about how much free space is available on computer $ df -lh Filesystem Size Used Avail Capacity Mounted on /dev/disk0s2 111Gi 109Gi 2.3Gi 98% / ...
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
Collection Select Helper and OnChange Event in Rails
Given a collection of Active Record objects, you may use the collection_select helper method to produce a select form field. You need to pass in a number of arguments to the helper function. 1) object - your model object used in the collection 2) method ...
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