Skip to content

Instantly share code, notes, and snippets.

View PeterWhittaker's full-sized avatar

Peter Whittaker PeterWhittaker

View GitHub Profile
@PeterWhittaker
PeterWhittaker / ghiAuthToken.md
Last active August 20, 2020 14:21
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
PeterWhittaker / getdef
Created August 10, 2020 22:24
BASH script to find SELinux macro definitions
#!/bin/bash
# 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 (https://keybase.io/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: