Using Github Gist as a configuration store 20 Jul 2015
Imagine you want to host a json configuration file somewhere. You also don’t want to host it yourself, but would prefer to rely on a stable provider.
You can use gist.github.com for this job.
For example this gist. You can see that there are 2 revisions.
If you click on raw you get the current version
- Version 1 https://gist.githubusercontent.com/mren/17da9837f691acd2e8ae/raw/9e26dfeeb6e641a33dae4961196235bdb965b21b/config.json
- Version 2 https://gist.githubusercontent.com/mren/17da9837f691acd2e8ae/raw/afd0087d1b230bbc663ae4f4a1e9a1bc426d7eef/config.json
In each version you see two hashes. One hash is equal in both hashes. This is the hash of the gist The other hash is the hash of the commit. If you remove the last one the raw file always points to the latest revision
https://gist.githubusercontent.com/mren/17da9837f691acd2e8ae/raw/config.json
Et voila.