Well, the question is in the subject, but I would repeat - what is the best programming/developer productivity tool you have coded yourself.
A small console application or a script you hacked in a day or two, and then wondering why have you waited for so long and haven't coded it earlier.
Something that automated the (now only a 10 seconds long) process which was a mundane 20 minute manual task before. Something that not only made you a day, but continued to do so for another month or even longer. A pinnacle of a DRY principle, even though it was just comparing a two xml files which could not be easily compared with a Beyond Compare. A small living piece of software that makes proud of.
So, what it was for you?