I highly recommend PersonalBrain (see thebrain.com) for references, URLs, notes etc that don't easily fit into rigid hierarchies (which in my case is most things - I hate deep hierarchies). It runs on MacOS, Windows and Linux, and the free version is pretty functional (though I did cough up for the 'core' version as it has additional features that I like).
It can also link into OS folders and OS managed files, so you can mix and match old school folders with things that you file in PersonalBrain itself. It doesn't really help with command line things, however.
Stuff I don't know what to do with yet, I file under a thought called 'unfiled', and then from time to time I categorise things I find there.
I also use voodopad on Mac OS X (a kind of desktop wiki), but any desktop wiki will do instead (tomboy, tiddlywiki, etc)...also PersonalBrain can also be looked on as a sort of wiki.