- Install this gem: https://github.com/swdyh/gisty
- Create a new access token in GitHub: https://github.com/settings/tokens
- You only need the
gist
box ticked, nothing else necessary
- You only need the
- Set this:
export GISTY_DIR="$HOME/path/where/you/want/gists/saved"
- Set this:
export GISTY_ACCESS_TOKEN=xxxxxxxxxx
- Run this:
gisty sync
...now sit and wait for it to start cloning all your gists into the specified directory
Use
ls -l | wc -l
to count how many gists you have
The cloned gists are placed inside folders named after the gist ID so it's not exactly clear what a folder is.
You can obviously try and search through your gists using something like:
function search_gists(){
local search=*$1*
find . -name $search
}
search_gists docker
search_gists aws
But remember that this is for local backups and not a replacement for GitHub's Gist service