If allowed, bring coffee, discreet snacks, and gum.
Even if you are not a note taker, start writing down everything the teacher is saying to keep your mind alert.
Move as much as you can. Tap your foot or bounce your leg. Switch position in your chair frequently. Stretch. Move your head. Tap your fingers.
Pain. This is kind of an emergency procedure. If you can't stay awake consider pinching yourself. I know it's a little strange, but pain can keep you awake.
Stimulating Thoughts: think of something that makes you happy or makes you feel good. I'll leave it at that.
Online activity: this wasn't around when I was in college, but I would imagine if you're in the back of the class you could surf the web, email your friends, and read Dumb Little Man.
Entertain Yourself: see if you can summon your extrasensory powers by willing someone to look at you. Or try across the room flirting. Why not?