Skip to content

Instantly share code, notes, and snippets.


Peter Whittaker PeterWhittaker

View GitHub Profile
PeterWhittaker /
Last active Aug 20, 2020
Simple Auth Token recipe for ghi

Using GitHub Auth Tokens with ghi

I'm using ghi to manage GitHub issues from the command line. ghi uses the GitHub API, which is HTTPS-only (not SSH), which means I cannot use my SSH keys to authenticate my ghi requests. GitHub is deprecating password authentication so authorization tokens are required; while this is more-or-less covered in the ghi docs, it isn't exactly clear.

Here's the simple, three-step recipe:

  1. Go to the GitHub new personal access token page (you will need your GitHub password)
PeterWhittaker / getdef
Created Aug 10, 2020
BASH script to find SELinux macro definitions
View getdef
# Searches the current directory for either all SELinux macro definitions or
# the SELinux macro definition specified by $1
# if $2 exists, there is a quoting error and we quit
if [[ ! -z ${2} ]]; then
echo "ERROR: invoked with too many parameters, probably a quoting error."
echo "USAGE: $0 [pattern]"

Keybase proof

I hereby claim:

  • I am PeterWhittaker on github.
  • I am peterwhittaker ( on keybase.
  • I have a public key whose fingerprint is 5080 146B 585F 7AF2 CCD1 FCEF 0214 DC30 B9BA 7D83

To claim this, I am signing this object: