If you license it right, anything's possible. (i.e. major corporations can't use your code illegally or they'll get caught.)
Just because the source code is publicly viewable doesn't mean anyone can take it without permission; small people will, but the companies that would pay you for such a thing can't get away with that kind of piracy.