For resistors, just get as many as you can of a wide spread of whatever values are available. They're $0.01 each, if you can find them reasonably priced, so there's no reason not to get a lot.
Capacitors, I suggest buying a pack of assorted electrolytics and a pack of assorted ceramics, and some 0.01-0.1 uF film caps.
For transistors, I recommend mostly buying 2N2222s, 2N4401s, and 2N4402s. Of course, 2N3904s and 2N3906s are slightly cheaper. If they cost more than about $0.15 each you're paying too much for them!
I also recommend some diodes, both rectifiers and signal diodes. Zeners too, if you think they'd be useful.
LEDs are always nice to have too; just buy an assortment.
And it's always useful to have an LM386 or three around.
Some logic ICs would be generally useful (74 series or 4000 series)
And don't forget a voltage regulator! Buy several, since they're cheap and useful. The 7805 provides a nice steady 5V output from a 7V+ input (and the 7905 provides a good -5V if you need a negative supply), or you can use an LM317 adjustable regulator to get any voltage you require. Or you could get this kit: https://www.adafruit.com/products/184
Which is a complete adjustable voltage supply in itself.