1) (I guess this only works if you're a programmer) Don't completely finish your last task of the night, leave a comment with TODO-110608 (that would be the date of tomorrow) where you need to polish. Gives you an easy entry point to your work.
2) Schedule your wasted time. I have three 20 min blocks dedicated to internet waste per day. No more. (I just spent 3 min on this)