Skip to content

Instantly share code, notes, and snippets.

Avatar
🎉

Justin Baugh baughj

🎉
  • Sacramento, CA
View GitHub Profile
View gist:dbd50131aa5c3e9c8068cb06bcb712a5
### 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 Mar 18, 2021
Script to lock OSX on yubikey removal & -HUP yubikey agent
View osx-lock-on-remove-yubikey.sh
#!/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 Mar 18, 2021
Yubikey agent plist (for running out of homedir)
View co.eris.yubikey-agent.xml
<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 Mar 16, 2021
yubikey provisioner script
View provision-yubikey.sh
#!/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 Sep 25, 2020
Hybrasyl Release Notes - September 25, 2020
View Hybrasyl-020200925.md

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 Aug 25, 2020 — forked from Caeldeth/Status-Documented.xml
Status Documentation
View Status-Documented.xml
<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 Feb 12, 2020
Asynchronous dialog (Lua) test for Hybrasyl
View asynctest.lua
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]),
View election.rb
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,
View Example script
#
# This file is part of Project Hybrasyl.
#
# (C) 2015 Hybrasyl Project.
# (C) 2015 Justin Baugh <baughj@hybrasyl.com>
# All rights reserved.
#
name = "Riona"
description = "Riona in Mileth Inn"
View proposed map yaml layout
---
# 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