From c344b41bcba6abd8108eb00212928b1641720d2d Mon Sep 17 00:00:00 2001 From: typebrook Date: Tue, 17 Dec 2019 13:57:22 +0800 Subject: update --- scripts/gist/gist | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 scripts/gist/gist (limited to 'scripts/gist') 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 @@ +#!/bin/bash + +github_api_token=$(cat $SETTING_DIR/tokens/github) + +curl -s -H "Authorization: OAuth $github_api_token" https://api.github.com/users/typebrook/gists |\ +jq '.[] | "\( .html_url ) \(.files | keys | length) \( .description )"' |\ +tr -d '"' | tac | nl |\ +while read line_num link file_num description; do + echo $line_num $link $file_num $(echo $description | cut -c -70) +done -- cgit v1.2.3-70-g09d2