Instead of having a million different tabs open, use a tab session manager, save the stuff you want to read later, and keep open only stuff pertinent to things you are working on.
Prioritize your projects to have actionable goals.
When you procrastinate, try to do so by being productive on smaller projects.
Be aware of your own nature, and try to exert control over it. Recognize that not every idea or desire is useful, and learn to discard the ones that are not and investigate or give more attention to the ones that are.
Organization, take notes and organize them. I often have a scratchpad textfile open, that I then organize into sections (e.g. app ideas, ideas for specific code projects, movie ideas, whatever), break these up further into project or topic files. The ones that grow and get fleshed out are the ones worth pursuing.
Have a healthy sleep and recreation routine to not get burned out.