Do research as soon as you can.
Surround yourself with the smartest people you can.
Don't make partying a priority (this is a painful one, but binge drinking, fun as it is, won't help you towards accomplishing either of your goals).
If you're learning a new language or tech, find a way to leverage it against something else you have to do for class. If you want to learn LaTex (for grad school, of course), write a paper for a class in LaTex. If you want to learn C, brute force the answers to discrete math problems with a problem written in C. There are lots of opportunities to do this.
MOST IMPORTANTLY, there will inevitably be a group on campus that is all about being geeky. Inevitably, they'll know something about tech as well, but they'll mostly want to use memes in real life, play weird card games, complain about athletes, etc. Including yourself in this group means ostracizing yourself from everyone else. Not worth it.
Take the hardest classes you can, and ahead of schedule.