I use the age-old (well, relatively so :)) equation of headphones and electronic music. It gets you into that coding trance that is so helpful for actually sitting down and getting work done: just put on fast-paced electronica/trance, open up TextMate/emacs/etc, and allow your focus to zero in on exactly the problem you need to address at that moment.