Skip to content

Instantly share code, notes, and snippets.

View baughj's full-sized avatar

Justin Baugh baughj

  • Worldpay Payrix
  • Sacramento, CA
  • 10:49 (UTC -07:00)
View GitHub Profile
@baughj
baughj / co.eris.yubikey-agent.xml
Created March 18, 2021 17:21
Yubikey agent plist (for running out of homedir)
<plist version="1.0">
<dict>
<key>Label</key>
<string>co.eris.yubikey-agent</string>
<key>EnvironmentVariables</key>
<dict>
<key>PATH</key>
<string>/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/opt/pinentry-mac/bin</string>
</dict>
<key>ProgramArguments</key>
@baughj
baughj / osx-lock-on-remove-yubikey.sh
Created March 18, 2021 17:31
Script to lock OSX on yubikey removal & -HUP yubikey agent
#!/bin/bash -u
prev_state="unknown"
prev_lock_state="unknown"
state="unknown"
lock_state="unknown"
function lock {
killall -HUP yubikey-agent
### Keybase proof
I hereby claim:
* I am baughj on github.
* I am baughj (https://keybase.io/baughj) on keybase.
* I have a public key ASCxPcwVIFWSiJXCRigKS15QUCzVaVVa7j-aak8UoLCjvwo
To claim this, I am signing this object: