How-To
Instructions on how to do something. Some ‘re big an’ some ‘re small.
Craft Personas with a Template
Personas help focus your work on the needs of real-ish users. In most places I’ve been, I’ve seen that over time the customer kind of morphs into a gelatinous mass of jumbled memory as contact with the actual end user is replaced by a marketing proxy. It’s a common experience, and there’s ways to reinvigorate [...]
Extracting CAS configuration into YAML, like database.yml
If you’ve done any enterprise work with Rails, and your shop is using CAS for authentication, chances are you’ve seen rubycas-client. Chances are you’ve also loved how easy it was to get working. There’s usually only one hitch — you’ve got to change the config based on which environment you’re deploying into. Here’s the standard [...]
HOWTO port install md5sum on your Mac
I’ve been using Linux for a long time. While it lost the battle for my desktop, it still reigns supreme in my server world. I have this very occasional habit of wanting to check if two files are really, honestly, undoubtedly the same. I had that need again today. I’ve always used md5sum on Linux. [...]
How to Configure Entourage Rules to Send All Appointments to a Folder
I’ve wanted to do this for months. I’ve searched Google a number of times, and never found a suitable solution for sending ALL my appointment requests in Entourage to a specific folder. I finally hit on it today. The key? Use Specific Header ‘Content-class’ Contains ‘calendarmessage’.
Using Google’s Chart API to Create Sparklines
Just a couple weeks ago I was wondering how Google made its sparklines for Google Analytics. I was creating a Health Page of sorts for my application (a rudimentary listing of recent performance statistics, like how long it took to get a DB connection). I had designed my stats collection piece to keep track of [...]
How to Setup Google Apps Chat SRV Records For iChat and xmpp4r-simple
I’ve registered several domains using Google Apps. Lately I’ve been fiddling with using Jabber with those domains, and I wanted to have a program be able to interact on IM using an account like tim@example.com. Furthermore, I wanted to have everything Just Work. The place to start was with DNS. Google has a help page [...]
Sweet Looking Headings with CSS
As I’ve been playing more with Safari lately, I’ve found that many good looking web sites add a bit of something extra for Safari. They use CSS to add a drop shadow to certain elements of the page. Take a look at this example from LightHouse (Firefox 2.0 on the left, Safari 3 on the [...]
HOWTO Restore Your SVN Trunk to a Previous Version
Sometimes you just need to admit that you’ve loused things up and you want to go back to the way you had them last Thursday. It takes courage to throw in the towel, but it also takes a reasonable understanding of how to do it quickly with your tool. Here’s the simple procedure I follow [...]
DB connection problems? Try a logging datasource!
We’ve been grappling with a number of different problems with our app over the last week. We’ve made many improvements, including several changes to our Spring configs (which I may touch on another day), but we still had a problem where occasionally we ran out of database connections momentarily — no matter how many we [...]
Customize Rails Validation HTML Using Hpricot
This morning I experimented a bit with overriding the default HTML generated by validation errors in Rails. Instead of wrapping the <input> tag inside a <div class=”fieldWithErrors”> indiscriminately (which was breaking the layout I wanted), I wanted to simply inject a new CSS class onto the HTML element. I found one email showing how to [...]
More Ruby Exporting of Groupwise to iCal
One of my most frequently requested posts is my initial exploration into using Ruby to export my Groupwise calendar to iCal format. The code I posted there was simple, and it almost worked. I figured that’d be the jumping off point for a lot of people to dive in and explore the options Ruby has [...]
Pinpoint error prone areas with log4j
Building internal IT systems is as much about the data that passes through your application as it is about the logic that operates on it. I’ve scanned log files of web servers for years. I often use a combination of grep, sed, and other tools to look into specific problems. These are often one-off curiosities [...]
Making Rails use Google’s AuthSub
I’ve managed to patch together several 10-minute sessions of playtime with Rails over the past few weeks, and the subject I’ve been pursuing is how to make Rails use Google for authentication. I first played with this idea back in February, after reading Phil Windley’s article on GTalk using XMPP. I grabbed the source of [...]
Building a Megajar with Maven2 – The Right Way
A megajar or uberjar is one jar file where all the contents of all dependent jars have been unpacked, and then everything has been re-jared up together again. This is normally a very Bad Thing. However, there are occasional one-off uses for such a thing. I’ve made a habit of following the advice given by [...]
Selenium IDE: Super Easy Acceptance Tests
Selenium is an excellent open source tool to test your website automatically, right from your browser. The test scripts are written as plain HTML files, which makes them easy to read, edit, and understand. BUT, it’s even easier than that. There’s an IDE for developing these tests. We used to use a different tool, but [...]
[Ruby] GroupWise export to iCal
UPDATE: I’ve posted a more complete version of this code in More Ruby Exporting of Groupwise to iCal. I’ve wanted to export my Groupwise calendar to iCal format for a long time. Every time I try to do it, I ended up running into the same few pages. They sorta worked, but were clumsy. So [...]
[Hibernate] How to setup a bidirectional relationship
I got the following question from a friend the other day. I have a parent and a child object with a one-to-many relationship by the child’s table having a column that points to it’s parent. What are the correct settings for the mapping in this situation where I need to be able to remove children [...]
[Subversion] Figure out which folders changed on a branch
Just wanted to jot down a quick Subversion recipe. I’m doing a merge today, and I wanted to know which of the 25 folders on my branch actually changed. Here’s what I used to figure it out. svn diff -r 4649:HEAD http://myserver/svn/branches/mybranch | grep “Index:” | sed -e “s/Index: \([^\/]*\)\/.*/\1/” | sort -u Downsides: If [...]
[Eclipse] More success with standardizing team plugins
I recently wrote about standardizing Eclipse plugins across your team by using a shared Eclipse product extension. We had to do a few things this morning that we hadn’t yet tried since we set this up about a week and a half ago, and it worked out great. We upgraded our common Subclipse plugin from [...]
[Eclipse] Standardizing plugins across your team
We’ve got several developers (more than 5) at work using Eclipse, and some are pretty new at it. We gave each a list of the plugins that we’d like them to install, and some that are optional. Some people put them on, and some didn’t have time to read through and understand how to install [...]







