Sandboxing Rails v2
Published by Robert Bousquet on 2010-07-05 00:48:00 UTC
It’s been a while since I’ve drastically changed the way that I manage my Rails stack. Going back to 2005, MacPorts seemed to be the way to go. Along the way, due to dependencies and the differing pace of each package there were times when my recipe didn’t work or needed to be updated with specific portfile hacks or versions. A lot has changed and in the last 5 years of Rails development and with Rails 3 right around the corner I figure it’s time to give this stack another approach.
Clearing Floats
Published by Robert Bousquet on 2010-05-19 01:00:00 UTC
In the past, you may have used a <div style="clear:both"></div>
to force a container to clear it’s floated contents. This has worked pretty well for a couple years, but yesterday I stumbled across a better solution: Simply remind the container div that it should be: overflow: auto
in your stylesheet and it’ll do the right thing.
Password Protected Zip Files (OSX)
Published by Robert Bousquet on 2010-05-16 23:39:00 UTC
Password protected zip files cannot be opened within the OSX Finder, you’ll just get an “Operation Not Permitted” error but you can use the command line utility /usr/bin/unzip [filename]
. It’ll prompt you for the password and then inflate the contents on success.
Disable ssh-agent in Snow Leopard
Published by Robert Bousquet on 2010-01-15 03:27:00 UTC
I use multiple ssh identities to connect to sites like github. This allows me to create accounts for a group of people that should all have commit access to a particular account, but that isn’t each person’s primary account. I ran into one problem on Snow Leopard which was that everytime I tried to authenticate to github using my non-primary account, it would send my primary ssh key first, regardless of specifying the key it should use. Read on for the fix.
Splitting large DMGs to fit on FAT32 Filesystem
Published by Robert Bousquet on 2009-10-03 02:30:00 UTC
I have a USB key where I store all of the installers and operating systems that I need to get setup on any machine. Since I have OSX, Windows and Linux operating systems stored there and I won’t always be using Mac hardware, I chose FAT32 despite its filesize limitations. To workaround the 4gb limit on individual files I use the following command to split the larger dmg images of OSX install disks:
Sandboxing Rails
Published by Robert Bousquet on 2008-05-30 16:13:00 UTC
James Duncan Davidson wrote up a great recipe for installing Rails that I have been pointing people to for a couple years. For some reason it’s now missing from his site so here’s my version of it from memory.
Recommended Rails Plugins
Published by Robert Bousquet on 2008-05-22 16:24:00 UTC
I use these plugins in almost every application.
Using Gmail SMTP with ActionMailer
Published by Robert Bousquet on 2008-05-22 15:45:00 UTC
Rather than fiddle with Postfix or sendmail on each of my servers, I use Google’s SMTP servers (provided by the Google Hosted Applications account) to send mail. This allows me to skip the confusing Postfix installation/configuration steps, and provides a higher likelihood that my emails will not get caught in spam filters.
Coming Soon
Published by Robert Bousquet on 2008-03-10 18:04:00 UTC
I will be moving my content here shortly.