We've all had that moment when we realize that we have just spent hours fiddling with .conf and .rc files, adjusting keymaps, recompiling/emerge world'ing our entire system, hunting down .dll's, slaying dragons and saving lusty wrenches, and occasional wizardry, in order to do a few minutes of actual coding.
I wonder, what is the most amount of effort you have ever put into making your programming environment just right, versus how it related to real work you were trying to get done.