Periodic reality checks. What's my goal -- my real goal? Is what I'm currently doing meaningfully advancing me to that goal? If not, stop that shit. Close the cat video. Put off theme dinking till your coffee break. You have to go back and do this time and time again. Pain in the ass but it's called discipline and it's how humans get shit done.