Author Archive

Tuesday, January 6th, 2009

Emacs on the Mac (Life has a funny way of sneaking up on you)

I’ve been using Emacs for more than 20 years now. I still use it just about everyday on servers I admin. However, a year or so ago I started using TextMate as my day to day editor for development on the Mac. TextMate has some nice features: a very [...]

No Comments » - Posted in Emacs, OS X by Spike

Wednesday, September 3rd, 2008

Dealing with read-only fields and partial updates in Rails 1.x

So, you have a column in your database you can’t update after the record is created. Not don’t want to update, but can’t. Specifically, you might have a column that is protected by a trigger, which will cause an error if that column is included in a update. How do you [...]

No Comments » - Posted in Active Record, Ruby on Rails by Spike

Thursday, February 21st, 2008

Quick and Dirty cropping images with attachment_fu

Rick Olson’s attachment_fu is a great plugin for attaching files documents to Rails models. It’s a rewrite of his acts_as_attachment plugin. While it can handle any kind of file data, most commonly, it is used for attaching images; as a result attachment_fu handles automatic resizing of images, and creation of thumbnails using RMagick, [...]

6 Comments » - Posted in Active Record, Ruby on Rails by Spike

Tuesday, February 5th, 2008

Encrypting Lots of Sensitive Data with Ruby (on Rails)

Previously I wrote about how to use public key encryption to automatically encrypt data using Ruby (and thus Rails). Because this method can encrypt data without a password, it’s very useful for securing information received from a form, without the person entering the from having to do anything special. However public key [...]

7 Comments » - Posted in Ruby, Ruby on Rails, security by Spike

Monday, June 11th, 2007

Encrypting Sensitive Data with Ruby (on Rails)

In Encrypting Sensitive Data with Perl I wrote about how to use public key encryption to automatically and securely encrypt information with Perl. This allows you encryption things like credit card numbers, bank routing information, or that winning PowerBall number in a unattended fashion. Typically, you would use this in a situation [...]

6 Comments » - Posted in Ruby, Ruby on Rails, security by Spike

Wednesday, May 2nd, 2007

Encrypting Sensitive Data with Perl

It’s not uncommon to have information submitted through a web form that you need to save, but don’t want to have lying around in plain text. Credit card numbers, bank routing information, missile launch codes, and so on. The trick is to do this in a unattended fashion; you don’t want to [...]

1 Comment » - Posted in CGI, perl, security by Spike