GitHub's user agreement allows for the free use of any code posted in a public repo.
GitHub user agreement allows other users to view and make copies of your content on github but not for "free use" in general.
https://help.github.com/articles/github-terms-of-service/#5-...