summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rwxr-xr-xscripts/gist/gist10
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
3github_api_token=$(cat $SETTING_DIR/tokens/github)
4
5curl -s -H "Authorization: OAuth $github_api_token" https://api.github.com/users/typebrook/gists |\
6jq '.[] | "\( .html_url ) \(.files | keys | length) \( .description )"' |\
7tr -d '"' | tac | nl |\
8while read line_num link file_num description; do
9 echo $line_num $link $file_num $(echo $description | cut -c -70)
10done