I spend a wee bit too much time on the Internet, and much of that is sort of dual use for my personal enjoyment and marketing. I have participated in HN and a few other forums for about fivish years now, and that has been a great opportunity to meet people. I try to get out to conferences and meet ups to meet folks outside of the massive Ogaki tech mafia. I also have a blog which has been fairly popular.
The most important thing I do for marketing is helping people, frequently. It opens a lot of doors. It also means there are a couple of... thousand, maybe? (crikey) ... people who will say nice things about me even when I'm not in the room. That has lead directly to consulting work (and business opportunities) in the past.
Can I say one heretical thing? Contribution to OSS is not by itself marketing. It is a fairly low ROI way to reach decision makers unless you are identified with a popular project. (You can easily spend many hours on a commit that no one but you or the mainainer will ever know you wrote. Spend the same amount of time directly solving a problem for someone and you have a fan for life.)
P.S. I truly love Github, but would not host my OSS on it, because it encourages use patterns which are extraordinarily suboptimal for marketing oneself. YMMV.
Your comment about leveraging an OSS project as a marketing tool is theoretically valid but, even when you follow best practice, it still doesn't always monetize as you might hope.
I have an active open source project, hosted on CodePlex, but also with its own supporting website, complete with dozens of tutorials and other resources. Traffic to the site is respectable (thanks to a few widely-read articles) and the downloads from CodePlex run into the thousands.
The majority of the users are corporate, so there is potentially lots scope for consulting projects and I never fail to follow-up opportunities. However, despite all of this, the only return I have so far earned from my efforts is the right to spend much of my spare time providing free support.
Put it on your own website, and actively market it to people who need it (including productization steps that OSS often doesn't take like having a logo, an install guide, etc). You'll be identified as the relevant expert.
The most important thing I do for marketing is helping people, frequently. It opens a lot of doors. It also means there are a couple of... thousand, maybe? (crikey) ... people who will say nice things about me even when I'm not in the room. That has lead directly to consulting work (and business opportunities) in the past.
Can I say one heretical thing? Contribution to OSS is not by itself marketing. It is a fairly low ROI way to reach decision makers unless you are identified with a popular project. (You can easily spend many hours on a commit that no one but you or the mainainer will ever know you wrote. Spend the same amount of time directly solving a problem for someone and you have a fan for life.)
P.S. I truly love Github, but would not host my OSS on it, because it encourages use patterns which are extraordinarily suboptimal for marketing oneself. YMMV.