remove safari’s resize grip in textareas

March 11, 2010

Another quickie: You know those resize grips that safari adds in to textarea input fields by default? Generally I find them helpful, but I was recently asked to remove them entirely from a website. Turns out it’s pretty easy to do, with some simple css: textarea { resize: none; } Cheers…

Read the full article →

textmate and ruby 1.9 – Invalid multibyte char

March 3, 2010

If you’ve upgraded to ruby 1.9 (i’m currently on 1.9.1), and you use textmate, you might be getting slammed with these “invalid multibyte char” errors when running all kinds of commands. A lot of textmate bundles are actually ruby-driven, so these errors can pop up even when you’re not running commands from a ruby bundle. [...]

Read the full article →

“version_requirements deprecated” warning in rails

March 1, 2010

[NOTE: This post is getting an alarming number of hits... everyone be sure and note the update at the bottom] Another minor annoyance with a quick fix: If you’re getting this warning: Warning: Gem::Dependency#version_requirements is deprecated and will be removed on or after August 2010. Use #requirement when running anything using rails (i believe this [...]

Read the full article →

fixing login_generator

February 26, 2010

The login_generator script seems to be broken with rails > 2.0.1, at least at login_generator gem version 1.2.2. It’s due to the fact that the login_generator script uses the older “.rhtml” extension, rather than the newer “.html.erb”, so you’ll get errors like this if you try and script/generate login: No such file or directory – [...]

Read the full article →

ruby 1.9, rails 2.3.5, and cucumber

February 25, 2010

My toy of the day is cucumber, a very intriguing BDD framework for ruby (and rails). I had quickly looked at a few screencasts and decided to jump right in, and did this: sudo gem install cucumber and right away, did this in a freshly made rails app folder: script/generate cucumber It’s probably not surprising [...]

Read the full article →

constraining php dynamic properties

February 18, 2010

PHP supports dynamic properties. Generally, I don’t find this feature to be very helpful at all, as it makes your code prone to bugs caused by property misspellings (yet another reason I’m not a huge fan of PHP at all). Take this snippet: 1 2 3 4 5 6 7 8 9 10 class foo [...]

Read the full article →

SWIG vs libxen

February 17, 2010

SWIG is an awesome tool. I’ve been developing a lot in ruby recently, and I’ve often wanted to use features from external C or C++ libraries, but hated writing the wrapper code to make them available to ruby. Enter SWIG — the Simplified Wrapper and Interface Generator. It takes 99% of the burden off the [...]

Read the full article →