$20K into a startup, which was sold to midrangeSoftwareCompany, which was in turn sold to Oracle. Wound up with 17 shares of Oracle, worth about $2000 at the time.
Another experience: $2K of "hell, I'm leaving so why not buy the shares I vested in". Eight years later the company is wildly successful (public and valued at $1B). I call them up, and my shares are worthless through some stock shenanigans.
A third: $5K investment turned into $21K. Yay. I guess I almost broke even on the Silly Valley slot machine.
Lastly: I did much, MUCH better with options and other stock-related stuff at a couple of large companies, spread out over 16 years. It's not unreasonable to make a few million on these in the course of your career.
Get a good salary. Don't trade a good salary for equity, because in general it's a bad deal and you're just going to get screwed.
If you're good and you take a low salary for the "developer class" equity that I've seen, take a hard look and see if you're getting anything else worthwhile (an education in technologies you wouldn't be using otherwise, good contacts, a possibility you'd be identified as a principal "must have" in an acquisition, with incentives to match, etc). Otherwise you're being taken advantage of.