I got a lot of initial traction by being one of the first people to work on DuckDuckGo's ZeroClick info (donated a lot of the programming documentation) which provided some initial back-links and referral traffic. Kept this going by adding more things through DuckDuckHack.
Everything from there has been posting on comments (where relevant), posting in StackOverflow, building relationships with those using it and improving things. There is quite a bit of SEO mixed in there but mostly I just keep pushing and making something I want to use.
A few larger blog posts seemed to work too. Some of the more in depth ones that took quite a while to write helped quite a bit. This was more about adding discover ability and SEO value though.
EDIT - Also a lot of directly targeting people complaining about lack of code search over twitter. This was especially effective when Google Code Search shut down and Koders.com hadn't got its act together. I had planned for this, but it was not as effective as I would have expected.