Archive for the ‘Scripting’ Category
Wednesday, April 8th, 2009
I was attempting to watermark an uploaded image using attachment_fu for uploads and the mini_magick gem for processing. I received an odd little error that Google doesn't seem to have many answers for. That error is Error 256. This is what I was doing:
after_attachment_saved do |image|
if image.thumbnail.nil?
...
Posted in Quick posts, Scripting | No Comments »
Wednesday, December 24th, 2008
In my latest Rails project I needed a quick way to return a string if that string happened to be blank, and also a way to return a different string if the existing string is set. Here's the solution I came up with which I placed in extras.rb in my ...
Posted in Quick posts, Scripting | No Comments »
Saturday, August 16th, 2008
I discovered this a couple of days ago, but the simplicity and "oh wow, I should've thought of this years ago"-ness of it makes me believe I'm not the first to think of this.
A few months ago I began receiving spam from the form over at my XHTML slicing site ...
Posted in Quick posts, Scripting | 2 Comments »