I’m still not clear just what you want, but perhaps you want to allow users to upload other file types? To do that you’d add to the authorized extensions site setting.
But if you want Discourse to serve a file like the github link that you linked to, I’m not aware of a way to have a user do that. (I’m not quite sure what happens if you make css an authorized extension–I think that the browser will download rather than render the page).