Ever had a solution staring you in the face and didn't even realize it? I have. It's always one of the obvious ones that (in hindsight) I can't believe didn't occur to me sooner.
GitHub is beyond doubt the number one place for sharing code and collaborating on projects right now. I share a lot of my code on GitHub when I'm writing a more technical post, my workplace uses it internally, and of course millions of people use it to create and maintain