this is the kind of developer who will make sure his code is commented from the perspective of letting someone else see how it works, and that your internal dev wiki is well gardened. if you ignore the value this sort of person can add, it is entirely your loss.
Ultimately, I suppose that either are a good bet if you're looking for someone who stands out in a certain way. In both places you should vet the quality of the code or quality of the answers. And if you're the type of employer who uses these as metrics for rating candidates, then I think you should also probably give your employees time to work on their Github projects/SO profiles (I didn't intend the irony there, but it's there all the same).
The problem might come if a company you apply to using a different method Googles your name and finds the stackoverflow profile, and then decides not to hire you based off of that. Feels a bit unlikely and I'd doubt any HR would understand the issue enough to do that at this stage. I'm not involved in HR and don't fully understand how their illogic works though - some do make hiring decisions based off of Facebook. laughs You probably don't want to work for a company doing that kind of thing to begin with though.