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

Generate a Gravatar URL with Ruby
To get a Gravatar you need to hash an email address with the MD5 algorithm. MD5 is a part of the Ruby standard library. Rails loads it by default, but otherwise you will have to require it yourself. This is a simple implementation. Gravatar su...
Written by Sean Behan on 04/11/2014
NO Table Cell Spacing Please
Remove cell padding on a table you add the cellspacing attribute and set it to "0". Is there a better way to do this with straight up CSS? Nothing seems to work... <table id='my-favorite-table' cellspacing="0" > ...
Written by Sean Behan on 06/17/2012
Ruby Strftime Day Without the Leading Zero
%e # rather than %d Time.now.strftime("%e")
Written by Sean Behan on 06/17/2012
Rails Send_File in Production Delivers an Empty File
If you're running Rails in production it will by default be configured to let apache or nginx send files for you. If you're handling file downloads yourself with send_file send_file("path/to/file.txt") you will notice that the downloaded files are empty...
Written by Sean Behan on 06/17/2012
How to Add Additional Sub Directories to the Default Rails Test:Unit File Structure
# Edit Rakefile in project root # # Add a new rake test task... E.g., rake test:lib, below everything else in that file... # Alternatively, add a task in lib/tasks/ directory and plop in the same code namespace :test do desc "Test lib source" ...
Written by Sean Behan on 06/17/2012