Chris Holtz LABS

Blog

Firefox 6 support

The Clear Cache Button has been updated with Firefox 6 compatibility.

it may take a little time for the Firefox add-on team to review and approve the update. In the mean time, you can get it here: http://chrisholtz.com/clearcachebutton.

Firefox 5 support

The Clear Cache Button has been updated with Firefox 5 compatibility.

it may take a little time for the Firefox add-on team to review and approve the update. In the mean time, you can get it here: http://chrisholtz.com/clearcachebutton.

Firefox 4 Compatibility

edit: The Clear Cache Button is fully Firefox 4 compatible. A Firefox 5 compatible version has been submitted to the Firefox Add-on team.

Sit tight Clear Cache Button users and check back here soon; Firefox 4 compatibility is on the way.

Once ready, it will be submitted to the Firefox add-on site. There is usually a few days wait before it is officially approved. If you want/need it before then I'll post a link here too.

Thank you for your patience folks.

Click to continue...

Honeypot captcha

Phil over at Haccked.com has an interesting alternative to typical captcha validation.

"create a honeypot form field that should be left blank and then use CSS to hide it from human users, but not bots. When the form is submitted, you check to make sure the value of that form field is blank."

I really like this approach - it is much less invasive than the usual word verification. I haven't implemented comments here yet, but I'll probably apply this when I do.

Click to continue...

Have you ever had the pleasure of playing family tech support? I do! That's why I'm spending memorial day afternoon running windows updates. Woo! What to do while waiting... browse the Internet, check; clean likely malware candidates off their PCs, check; Zone out while listening to the wind, check. Oh! I can write a blog post about ruby inject!

Actually, I want to talk specifically about using the Hash class with inject. If you have a hash with a bunch of keys that are strings that you would like to convert to symbols, you'd do something like this:

>> x = { "first_name" => "John", "last_name" => "Smith" }
=> {"last_name"=>"Smith", "first_name"=>"John"}
>> x.inject({}){ |hash,(k,v)| hash.merge( k.to_sym => v) }
=> {:last_name=>"Smith", :first_name=>"John"}

Click to continue...

Have you ever been tasked to convert all instances of a URL into a hyperlink from some source of text? Or perhaps you had to pipe all URL instances through a URL shortener?

I've had to do this from time to time over the last several years (the first stab a it was a miserable piece of code but got the job done), and every time I have had to deal with the same quirks: what if the URL is at the end of a sentence, what if it is at the end of a line, what if it is immediately followed by an html page break, etc.

Dear god, what have I done to deserve this?

Click to continue...

Slicehost is an excellent hosting platform - I've been using them for some time now. However, in the interest of trying to drive costs down to absolute zero, I started evaluating Heroku as a platform to host this site.

Slicehost

If you're not familiar, Heroku and Slicehost differ structurally: Slicehost provides you with a virtual instance of Linux - most major distributions are available. It's your job to configure/manage the web application framework.

This opens a world of flexibilty - you can deploy any web-based solution you like backed by the database of your choosing. This is incredibly empowering - but you own everything, including downtime (at least downtime not incurred by Slicehost), maintenance updates, security, etc.

Click to continue...

Comparing web hosts

I have an instance of this site deployed on both Slicehost and Heroku and am running tests on both. I'll post formal results soon; in the mean time, desipite it's restrictions, I'm leaning towards Heroku.