So this is Ruby Manor part 2. After the Ruby Manor morning session we had a tasty pub lunch, rocked up a little late, and settled down to an interesting afternoon of Ruby talks…
Again, the errors and omissions are mine.
ruby, rails, textmate, automation, etc.
So this is Ruby Manor part 2. After the Ruby Manor morning session we had a tasty pub lunch, rocked up a little late, and settled down to an interesting afternoon of Ruby talks…
Again, the errors and omissions are mine.
I’m lucky enough to be at RubyManor today; a Ruby conference organised by Ruby users, for Ruby users, costing the grand total of twelve of your British pounds. A bargain, as you’ll see if you check the lineup of talks and speakers.
I started making notes, but it seems to have evolved into some kind of blog post. Apologies for typos, crap grammar and glaring errors.
Stoyan Stefanov has recently written an interesting series of articles on optimising image files for the web. In his latest article he shows how to use pngcrush to safely shrink your files, one file at a time:
$ pngcrush -rem alla -brute -reduce src.png dest.png
This evening I found myself wanting to repeat that command for all the PNG files in my current directory, and then (having reviewed the new images) overwrite the originals. Rather than do it by hand I did what all pragmatic programmers do these days, and wrote a script. Here it is in action:
$ pngcrushall
Crushing test4012.png ... ok
Crushing test9200a.png ... ok
Crushing test9200b.png ... ok
Overwrite original files? (y/N) y
Overwriting test4012.png ... ok
Overwriting test9200a.png ... ok
Overwriting test9200b.png ... ok
You can get it from github – download pngcrushall.
Obviously you’ll need to install pngcrush too. On a Mac this is pretty easy with MacPorts:
$ sudo port install pngcrush
I’ve recently been developing a Rails app that relies on a database that is maintained by another team as part of a different application. As you can imagine, unexpected changes to the database schema can bring our Rails app to it’s knees if they’re deployed to the live server before our application is updated.
So far we’ve been lucky, but the issue has been at the back of our minds for a while. So this week I sat down and cooked up a solution, and we’ve called it Integral.
Integral consists of some Thor tasks that:
All the Integral code is on github, and I’ve written some fairly extensive documentation on the Wiki. Please try it out, give us some feedback, fork it, burn it, give us some feedback, etc. etc.