So what's my dirty little secret? Three simple things: I keep a to-do list, the items on the list are incredibly clear and take, at max, 2 hours, and finally, I switch gears if I have to wait on other people (i.e. I don't surf the net while I wait for an email to approve workflow, I simply switch to another item on my to do list)
I am INCREDIBLY focused on execution, and if I have a task that I know can cause my mind to wander, I limit the amount of time I spend on it (for example, I have research potential repository structures, 1 hour, on my to do list right now).
I used to write things like 'redo startup website' on my to-do lists years ago. Now it's '1. rewrite main copy on landing page to highlight x feature 2. rewrite faq to include a, b, c questions. 3. change contact form to say 'sign up', reset analytics'. Make your tasks granular, tactical, and limit the time frame. I also start my day with a maximum of 6 things on the to-do list, and I rank them based on priority. As I start to cross things off the list, I add more to the next day (or for later that day if I am finishing things faster than I had anticipated). Finally, before I go to bed at night, I make sure I have 6 items on my to do list for the next day, so I can hit the ground running.
Plan ahead. Break it down. Prioritize. Write things down. Regardless of what you do for a living, or where you are in life, you can definitely use this method to improve your productivity. Good luck!