Skip to content

Instantly share code, notes, and snippets.

View baughj's full-sized avatar

Justin Baugh baughj

  • Worldpay Payrix
  • Sacramento, CA
  • 04:23 (UTC -07:00)
View GitHub Profile
### 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:
@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
@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 / provision-yubikey.sh
Created March 16, 2021 17:41
yubikey provisioner script
#!/bin/bash
set -e
if [ $# -ne 3 ]
then
echo "Usage: $0 <OSX username> <ssh principals> <expiration>"
echo "Example: $0 baughj justin.baugh,baughj 1825"
echo ""
echo "Warning: It's a good idea to have at least two yubikeys for token auth,"
@baughj
baughj / Hybrasyl-020200925.md
Last active September 25, 2020 16:45
Hybrasyl Release Notes - September 25, 2020

Hybrasyl Alpha - Phase IV - September 25, 2020

Release Notes

Version: Hybrasyl 0.7.3 (commit 3277307)

Server Fixes

Tickets Closed

@baughj
baughj / Status-Documented.xml
Last active August 25, 2020 19:28 — forked from Caeldeth/Status-Documented.xml
Status Documentation
<Status xmlns="http://www.hybrasyl.com/XML/Hybrasyl/2020-02" Duration="Integer" Tick="Integer" Icon="uShort" Name="String">
<!--Introduction-->
<!--This is the fully documented "How to make an Status" guide. Several references will be made to the coma status in the
public repository. Additionally, a fully filled out "Test" status will be provided in ExampleStatus.xml for an example of a
well formed xml with every possible element called at least once-->
<!--xmlns Element: Should reference the most current xml definition at hybrasyl.com-->
<!--Duration Element-->
<!--Description: The time the status lasts in seconds-->
<!--Overrides: Can be *replaced* in status section of Castable-->
@baughj
baughj / asynctest.lua
Created February 12, 2020 18:35
Asynchronous dialog (Lua) test for Hybrasyl
function OnLoad()
-- Something that should only run the very first time the script is instantiated,
-- rather than every time it is evaluated.
asynctest_send = {"Hello! This is a test of the asynchronous dialog system.",
"In the next dialog, please enter the name of an Aisling in the world. They (should) receive a dialog.",
"I have sent the dialog request. Isn't this fun?"}
asynctest_send_seq = world.NewDialogSequence("asynctest_send",
world.NewDialog(asynctest_send[1]),
@baughj
baughj / election.rb
Created November 8, 2016 21:38
election ruby
require 'json'
require 'net/http'
require 'date'
electoral_votes = { "AL" => 9, "MT" => 3, "AK" => 3, "NE" => 5, "AZ" => 11,
"NV" => 6, "AR" => 6, "NH" => 4, "CA" => 55, "NJ" => 14,
"CO" => 9, "NM" => 5, "CT" => 7, "NY" => 29, "DE" => 3,
"NC" => 15, "FL" => 29, "ND" => 3, "GA" => 16, "OH" => 18,
"HI" => 4, "OK" => 7, "ID" => 4, "OR" => 7, "IL" => 20,
"PA" => 20, "IN" => 11, "RI" => 4, "IA" => 6, "SC" => 9,
# set a fancy prompt (non-color, unless we know we "want" color)
case "$TERM" in
xterm-color) color_prompt=yes;;
esac
# uncomment for a colored prompt, if the terminal has the capability; turned
# off by default to not distract the user: the focus in a terminal window
# should be on the output of commands, not on the prompt
#force_color_prompt=yes
@baughj
baughj / gist:1032732
Created June 18, 2011 02:26
O U noe
To whom it may concern:
I am writing to you today to apply for the position of Mechanical Engineer I. I
believe Triple Ring would be a great fit for me, for a variety of reasons.
I find environments with variety and novelty in my day to day tasks to
be very rewarding. I also like the idea of working with a team to take on
challlenging tasks in a variety of application domains, and being involved in
every level of the design and prototyping process. I believe the experience I
would gain at Triple Ring would be invaluable for someone looking to start a
career in Mechanical Engineering.