Problem: When linking to the raw version of a gist, the link changes with each revision.
Solution:
To return the first file from a gist: https://gist.github.com/[gist_user]/[gist_id]/raw/
- Example: https://gist.github.com/atenni/5604522/raw/
- Works even when you change the filename.
To get a file from multi–file gist: https://gist.github.com/[gist_user]/[gist_id]/raw/[file_name]
You can use query parameters to get around caching if you want fast updates, i.e. every time you make a request append something like
?cache-bust=(some random url-safe string)
to the URL. As far as I can tell, any query string works, so you can omit thecache-bust=
if you want, or usedonkey-poo=
if you feel so inclined.