Skip to content

Instantly share code, notes, and snippets.

View rdpickard's full-sized avatar

Robert Daniel Pickard rdpickard

View GitHub Profile
@rdpickard
rdpickard / gist:5a096667bf935ae6dac646ad7b25bdcb
Created November 13, 2022 23:10
Graph the number of issues on a git repo by date from the command line using github command line tool
gh api -H "Accept: application/vnd.github+json" /repos/mastodon/mastodon/issues --paginate | jq -r ".[] | .created_at" | awk '{ print substr( $0, 1, length($0)-10 ) }' | sort | uniq -c | sed -e 's/^ *//' | sed -r 's/([0-9]*) (.*)/\2 \1/' | gnuplot -p -e 'set title "Mastodon git repo issues by date" ; set xdata time; set timefmt "%Y-%m-%d"; set format x "%Y-%m"; plot "/dev/stdin" using 1:2'
@rdpickard
rdpickard / gist:2b8f4697e6c404c9d48f3630f8999118
Last active April 25, 2022 19:32
Twitter following, blocked user and list members archiver
import os
import http.server
import logging
import sys
import time
import webbrowser
import functools
import json
import arrow
@rdpickard
rdpickard / gist:8da9f83b5dd98edf3176
Created January 13, 2016 03:40
Loading Google API JSON service account credentials in python
import logging
import json
from oauth2client.client import SignedJwtAssertionCredentials
# P The Google API Using OAuth 2.0 for Server to Server Applications documentation
# P only seems to document using .p12 files. This is a snippet for openeing the suggested
# P JSON format key file
# P https://developers.google.com/api-client-library/python/auth/service-accounts#jwtsample