diff options
| -rwxr-xr-x | scripts/gist/gist | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/scripts/gist/gist b/scripts/gist/gist new file mode 100755 index 0000000..dbc76b3 --- /dev/null +++ b/scripts/gist/gist | |||
| @@ -0,0 +1,10 @@ | |||
| 1 | #!/bin/bash | ||
| 2 | |||
| 3 | github_api_token=$(cat $SETTING_DIR/tokens/github) | ||
| 4 | |||
| 5 | curl -s -H "Authorization: OAuth $github_api_token" https://api.github.com/users/typebrook/gists |\ | ||
| 6 | jq '.[] | "\( .html_url ) \(.files | keys | length) \( .description )"' |\ | ||
| 7 | tr -d '"' | tac | nl |\ | ||
| 8 | while read line_num link file_num description; do | ||
| 9 | echo $line_num $link $file_num $(echo $description | cut -c -70) | ||
| 10 | done | ||