Contain your internet addictions by hitting a wall
An easy way to avoid distractions while working on your device is to logout from email, social media, and any other accounts that often steal your time.
Next time you try to check out one of those sites you'll hit a wall—the login page.
You'll get a second chance to decide whether to give into the distraction or to continue working and come back to the site later.
Other tools such as Freedom or SelfControl let you block websites and apps for set periods of time, forcing you to stick to whatever you need to work on.