diff options
| author | typebrook <typebrook@gmail.com> | 2019-12-17 13:57:22 +0800 |
|---|---|---|
| committer | typebrook <typebrook@gmail.com> | 2019-12-17 13:57:22 +0800 |
| commit | c344b41bcba6abd8108eb00212928b1641720d2d (patch) | |
| tree | fbcc6be97fa722261e5708b88b6ab1e06a3c65cb /scripts | |
| parent | 2e373de5bc2a2a5d57cf0bd2b4e2d6ad828cad38 (diff) | |
update
Diffstat (limited to 'scripts')
| -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 | ||