For more tips like this, sign up to the weekly newsletter!

Serve files from GitHub

When you click Raw next to a file on GitHub, copy the URL, and load the scripts, it won't work. The reason behind this is that GitHub intentionally sets the content type to text/plain, which the browser refuses to load as js/css.

Fortunately, there are multiple CDNs to help in this matter.

GitHack

Go to https://raw.githack.com/, paste the URL from GitHub, and use the result for the script/link tags.

Gists are working too, without any further hassle.

NB! There are two URLs. One for development and one for production. The former does not have any caching making it suitable for development, but if you forget to replace it with the production one, you run the risk of being banned.

GitCDN

Go to https://gitcdn.xyz/, paste the URL from GitHub, and use the result.

GitCDN only outputs one URL, so you don't need to replace dev with production URLs. The downside is caching. If you push a new commit, you need to wait ~2 hours to see the changes, which might hinder rapid development cycles.

References
Learn more: