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

Programmatically Turn Off Comments in Wordpress with Filter
To turn comments off programmatically with a filter in Wordpress, you can set the post object's comment_status variable to "closed". Call the filter at some point after the post is loaded but before the comments are rendered. This is a hack, but I haven't...
Written by Sean Behan on 06/17/2012
A Couple of Usefule Snippets When Working with Textmate
Here is the snippet f path/to/directory 'search string' | open_in_mate This snippet (technically 2 snippets) will recursively scan the contents of files in a directory and then open all the files it finds in Textmate. It's useful on large projec...
Written by Sean Behan on 10/18/2013
Fixing MySQL for Rails 2.2 Development on Mac OS X
Oh what trouble Rails 2.2 and MySQL (on Mac OS X) can be. Rails, as of version >= 2.2, no longer comes bundled with the MySQL adapter. This means you'll need to install it yourself, but it appears that the gem for installing it is also broken. This will ...
Written by Sean Behan on 06/17/2012
Cool Conditional Syntax in Ruby (on Rails)
Ruby is beautiful @posts = if true Post.all else [] end Simply elegant!
Written by Sean Behan on 06/17/2012
How to Render Partials with an Underscore in Sinatra
Sinatra doesn't have a method for rendering partials. It defers to the template language of your choice. For instance, if you're using ERB, it's as simple as erb :'path/to/partial' Rails has a nice convention of using an underscore to mark file...
Written by Sean Behan on 10/13/2013