Our big celebrity charity news site runs on Rails, and I’ve just switched all the view code from erb to haml. I cut the total number of lines of view code from 2370 to 1788, which makes for a saving of 25%.
Use a Bookmarklet to Toggle the Blueprint CSS Background Grid
I’m a big fan of grid-based layouts, particularly using CSS frameworks like YUI. For all their apparent conflict with the ideals of semantic markup, these frameworks save a ton of time.
My current favourite is Blueprint CSS, which I used for the recent redesign of our celebrity charity news site, and I found a neat way to toggle the positioning grid on and off with a bookmarklet instead of by changing the site’s HTML templates.
Rails Gets New Dbconsole Script
I’m happy to announce that my db_console plugin for Rails has just been added to Rails Core.
Part-way to an Emacs Git-svn Mode
Interacting with git from within emacs is a pleasure, thanks to the official git-mode and Christian Neukirchen’s fantastic gitsum mode. Here are some convenient bindings for running git-svn from emacs.
Rails/jQuery Magic: Marking External Links With a CSS Class
Want to mark external links on your website with a little icon or a
different colour? Well, you’ll want to give all those a tags a
CSS class, and style them up accordingly. In this article I present
an easy way to do this without directly altering all the links in your
application, exactly as I implemented it on this
popular celebrity charity news site.
Generate an HTML Index of Your Ruby Gem Rdocs
Rubygems is kind enough to generate RDoc for installed gems, but the directories move as the gem versions evolve, and it’s inconvenient to keep browsing for them. This tool produces a useful HTML index with direct links to the RDocs for all the gems installed on your system.
Relocating Git-svn Repositories
If you use the amazing git-svn to work in a civilised manner with a subversion repository, you may have trouble if the subversion repository is relocated, ie. has its access URL change. This article describes an approach for handling this situation, which git-svn does not directly support.
Renumber Clashing Rails Migrations in One Easy Step
If you work in a team on a Rails project, chances are that you and
your team mates occasionally create identically-numbered migrations.
Renumbering a migration that you’re working on is a pain, unless
you’re using this handy renumber_migrations plugin.
Init Scripts Considered Harmful
Tired of PID files, needing root access, and writing init scripts just to have your UNIX apps start when your server boots? Want a simpler, better alternative that will also restart them if they crash? If so, then read this quick-start introduction to process supervision with runit/daemontools.
How to Fix Hibernation Panics on Leopard After a Memory Upgrade
One of my Macs running OS X Leopard was panicking after I upgraded its memory; while waking from hibernate, I’d get the grey curtain of death and the multilingual “reboot this computer” message panel. If it happens to you too, you’ll be glad to know there’s a solution.