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]
How did you get such short a gist_id in your examples? I realise git hashes can often be shortened but it's not happening for me:
https://gist.githubusercontent.com/inspector71/59e5598/raw/
returns a 404 whereas:
https://gist.githubusercontent.com/inspector71/59e559824edfead1b0d3366ce402a687/raw
returns expected result.