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 Pipe To A Ruby Command Line Application
You need to read from STDIN rather than parse command line arguments. while $stdin.gets puts $_ end
Written by Sean Behan on 10/17/2013
Nested Has_one Relationship with Fields_for and Attr_accessible in Model Class
To make child attributes accessible to your model through a nested forms (Rails 2.3) you'll need to add the "#{child_class}_attributes" to the attr_accessible method in your parent class. If you don't use attr_accessible in your parent model (you would do...
Written by Sean Behan on 06/17/2012
How To Remove Duplicates From a Table with Postgres
Let's create a table that will hold some dummy data. > create table fruits (id serial primary key, name varchar, color varchar); > insert into fruits (name, color) values ('apple', 'red'); > insert into fruits (name, color) values ('ap...
Written by Sean Behan on 10/08/2013
Using Formtastic to Cleanly Create Nice Looking Forms in Rails
Forms can easily get cluttered when you're dealing with a lot of form fields... er, ERB tags. I've written about extending Rails form builders, which certainly goes along way to shrinking your views where forms are used. The plugin Formtastic is even bett...
Written by Sean Behan on 06/17/2012
OpenSSL Certificate Generation Information for Certificate Authority to Serve Traffic Over Https
apt-get install openssl openssl genrsa -des3 -out server.key 1024 openssl req -new -key server.key -out server.csr You'll be prompted to enter a password (don't forget it!) as well as fill in company identity information. The most important part is the ...
Written by Sean Behan on 06/17/2012