Stash files on gist.github.com
$ wget https://gist.githubusercontent.com/btbytes/73d6ddb0cf940e730edf22a60208691b/raw/fbf9efb44ee1c88eaaa3f62d6437737402ea74ce/gistash
$ chmod +x gistash
The script uses only python standard library. Tested with Python3.11.
You need to get a GITHUB_TOKEN
from github.com/settings/tokens and make it available in your environment.
When creating a new gist:
$ gistash *.txt
uploading a.txt
uploading b.txt
done.
You can pass --public
flag when creating a new gist to make it publicly visible.
When updating an existing, gist(say 28fe346dc83fd26a43c351c507c6599d
) that you have permissions to update:
$ gistash *.txt --gist-id 28fe346dc83fd26a43c351c507c6599d
updating a.txt
updating b.txt
uploading c.txt
done.
Note: --public
is not implemented for update.
Original idea: gistash from my blog dated May 14, 2020.