Skip to content

Instantly share code, notes, and snippets.

@hivehand
hivehand / list_failures
Last active August 18, 2025 19:31
Extract the set of skills that each player has failed at least once in attempting to use.
#!/usr/bin/env ruby
# This script serves to extract the list of each character's failures.
# Using it requires a bit of brute force. You must:
# - View the entire log history as a single page in your browser.
# - Save just the raw text of the page to a file. (On a Mac, do a
# select-all and copy, followed by a `pbpaste` piped into a file.)
# - Open that file in an editor, and clip out _just_ the part
# between the current markers.
# After you've done all of that, you can run this script against the
@hivehand
hivehand / qrenc-wifi
Last active May 17, 2024 18:09
Scriptlet for creating QR codes that let people join a WiFi network just by scanning the code.
#! /usr/bin/env ruby
# Take a network SSID as an argument, and prompt for the corresponding
# password. Generate a WiFi-network credential set suitable for QR
# encoding as defined in:
#
# https://github.com/zxing/zxing/wiki/Barcode-Contents#wi-fi-network-config-android-ios-11
#
# then generate that QR code and save it to `<SSID>-QR.png`.
#
@hivehand
hivehand / ppmesh.ps
Last active November 17, 2022 20:15
Teeny tiny hexagon tiling
% Draw, in white on black, the set of Pointer Pattern Pad hexagons described
% here:
%
% http://bitsavers.trailing-edge.com/pdf/xerox/mouse/lyon_optical/018P87005_D_Pointer_Pattern_Pad_Oct84.pdf
/inch { 72 mul } def
% Alter the following for different page sizes.
/pagewidth 8.5 inch def
/pageheight 11 inch def

Keybase proof

I hereby claim:

  • I am hivehand on github.
  • I am hivehand (https://keybase.io/hivehand) on keybase.
  • I have a public key whose fingerprint is 81C1 26A8 A38B FBB7 200D B895 94E1 A0A3 0F83 30FB

To claim this, I am signing this object:

@hivehand
hivehand / pds.sh
Created February 12, 2015 00:38
Mac-only bash function to push a personalized datestamp into the paste buffer.
function pds {
local user_name=$(dscl . read /Users/$(whoami) RealName | grep -v RealName | \
cut -c 2- | sed -E 's/ ([^ ])[^ ]*$/ \1/')
echo "[$user_name, $(date +%F)]" | pbcopy
}