The best way to get work done is to get somewhere where you can focus. This includes not just location, but also mindset. If I really want to focus, I have to train myself to avoid thoughts like, "it would be nice if those exceptions that I just added to my hosts file would update themselves based on my browsing habits..."
I go somewhere alone, pop in ear buds playing some type of non-distracting noise, shutdown my email client, turn off my phone, and go to work.