Skip to content

Instantly share code, notes, and snippets.

View baughj's full-sized avatar

Justin Baugh baughj

  • Worldpay Payrix
  • Sacramento, CA
  • 22:36 (UTC -08: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,
#
# This file is part of Project Hybrasyl.
#
# (C) 2015 Hybrasyl Project.
# (C) 2015 Justin Baugh <[email protected]>
# All rights reserved.
#
name = "Riona"
description = "Riona in Mileth Inn"
---
# Map
# Required values: id,size,name
# Optional list values: flags, music, warps, worldwarps, npc, spawns, reactors
# Optional scalar values: min_lev, max_lev, min_ab (this will automatically set min/max on inbound warps)
id: 312
size: 64x64
name: Test Map
flags: [snow, rain, dark, nomap, winter]
min_lev: 1