Get rid of reddit and HN first, later you can tackle your blog and Github (as they are at least slightly productive).
If you can break that first impulse to visit these sites, it's a lot easier to control yourself. But you do need to make sure you're not using proxies or some other workaround to access the sites and that will take self control and some reflection.
Reddit: Reddit is nearly a complete waste of time these days. Block Reddit using your hosts file. I redirect reddit.com to localhost where I host a page that says "no reddit! get productive".
HN: Let yourself occasionally browse HN as it's not all trash like reddit. Set up anti-procrastination in your HN user preferences. Make sure to go with the most extreme settings.
two more tips: * Dont bring your computer into your bedroom. I set the power of my router to not provide internet in my room.
* As danso said, USE A TIMER!
For interesting articles during work time I always save them for later. This is usually using Pocket (getPocket.com) but there are other tools. Later I read them when I am in the mood to read the interesting articles. This way, I try to limit wasted time.
For when I want to add a comment, I actually plan to only do it 2-3 times a day, and at most in 15 minute slots each time. This again puts an upper limit on my time on non-work tasks.
Once you do the above, you realize how much time you were wasting on non-essential things. And from there, you can take on other fun projects.
Find ways to be more comfortable engaging in them.
Physical activity and (healthy -- no need to be Arnold) strength tend to promote self-confidence and a sense of well being.
Take some walks -- even if by yourself. Walk in interesting/enjoyable places.
Buy some dumbells and spend 10, 15, 30 minutes a day on some basic exercises. Depending upon your work environment, you might keep them at your desk and do a few reps now and then or when you're tired or blocked, anyway.
Don't paint too big a target. Start with small things, and see where it builds.
Oh, and look at other things that leave you feeling more socially comfortable. A haircut. Clothing that blends in with the crowd you're approaching. You don't have to "sell out". Just... nibble at the edges of some of the emotions that might feed what you're describing as an anti-social tendency.
-- Your friendly neighborhood hermit (i.e. take this with a grain of salt, but I have noticed these factors, myself)
P.S. Ok, I'll add: I've had some abusive neighbors that made my life a hell. After several years, recently they've gotten somewhat better, but I still live in fear of recurring abuse.
The resulting seclusion has been... a self-perpetuating downward spiral.
It became easy to turn to and hide out in "online". But this did not stop the downward spiral in other aspects of my life.
Don't let such a pattern set too deeply. The longer it lasts, the worse it gets, and the harder it is to get out of.
* Have one browser, your least favorite browser, reserved for your social sites. It makes it harder to switch from your github-viewing/work browsing to HN/reddit/etc because you don't have the ability to comment or track discussions as easily (from the work browser).
* If that's not enough, change your passwords to your social accounts to a random string and paste it into a text file, and then log off your accounts. When you need to log back in, find that text file and copy-paste the password in. This creates enough friction that you can slowly break the habit of compulsively checking social sites when you don't need to.
* Use a timer to work. I like using the iPhone Ambiance app (99 cents), which lets you download from a huge library of ambiant noise sounds, from static noise to train stations, and I set a timer for half an hour in which I do nothing but the current task.
This sounds like small-time stuff but breaking habits is small time stuff. As with coding, don't think of it as "I need to build this awesome web app/uber-function", think of it as the smallest parts leading to the major goal.
With habits, especially, it's important to just follow routine until it's muscle memory. In this case, the routine is: not compulsively/instinctively checking websites for leisure.