The comparison to the Library of Alexandria is misleading, I think, because even if GitHub goes under, almost no data will be lost. Every bit of code that is hosted on GitHub is being stored locally somewhere by someone and and in many cases by more than one person.
This article is really about SourceForge and it's quest for revenue through fake "Download" button-ads as a cautionary possible future for GitHub. However I expect GitHub will avoid such blunders and I think they already have a solid business going with private repos. At any rate, if it becomes a poor environment developers and maintainers will move again...