Skip to content

Instantly share code, notes, and snippets.

View tdhsmith's full-sized avatar

t d h smith tdhsmith

View GitHub Profile
@tdhsmith
tdhsmith / botc_sv_subbed.json
Created April 12, 2026 18:07
BOTC S&V subs
[
{
"id": "potatopatch_groundskeeper",
"name": "Groundskeeper",
"image": "https://www.bloodstar.xyz/p/Gobinator/The_Potato_Patch_Part_1/groundskeeper_the_potato_patch_part_1.png",
"team": "townsfolk",
"ability": "The Grimoire is arranged according to a pattern. [+Gardener]",
"flavor": "Eyy Orp! Mahnd the graass wou'd'n yer! I'v'n jus' plaanter'd that this mornan'!",
"firstNight": 0,
"otherNight": 0,
@tdhsmith
tdhsmith / botc_sandp.json
Created April 12, 2026 16:55
BOTC Schismsand Pansies
[
{
"id": "_meta",
"author": "Darvey",
"name": "Schisms and Pansies (v0.4.2)",
"firstNight": [
"dusk",
"minioninfo",
"bootleggersanthology_insysns",
"demoninfo",
@tdhsmith
tdhsmith / botc_fsa.json
Created April 12, 2026 16:54
BOTC Foul Selene's Ascension
[
{
"id": "_meta",
"author": "darvey",
"name": "Foul Selene's Ascension (v0.2.2)",
"firstNight": [
"darvonics_intern",
"dusk",
"darvonics_notary",
"reddit_caretaker",
@tdhsmith
tdhsmith / chronicle_template.tex
Created September 16, 2020 23:32
Pathfinder 2e Chronicle Generator
\documentclass[]{article}
\usepackage{wallpaper, array}
\usepackage{calc}
\usepackage{etoolbox}
\usepackage{tikz}
\usetikzlibrary{patterns}
\usetikzlibrary{calc}
\usepackage[absolute,overlay]{textpos}
@tdhsmith
tdhsmith / OLGS_CA_game_inventory_hack.user.js
Created October 18, 2017 16:53
Very rough userscript to expose exact inventory data on Canadian games retailers BGB and 401G
// ==UserScript==
// @match https://store.401games.ca/*
// @match https://www.boardgamebliss.com/*
// ==/UserScript==
const is401 = document.location.host.indexOf("401") > -1;
function getProduct() {
try {
if (is401) {
const wrapper = document.getElementById("ProductJson-product-template");
@tdhsmith
tdhsmith / sever.js
Last active January 18, 2017 17:44
websocket-monitor opcode test server
const http = require('http');
const WebSocket = require('ws');
// you'll need to npm install ws (tested on v1.1.1, which was the default as of this writing)
const wss = new WebSocket.Server({
port: 3001
});
wss.on('error', console.error);
wss.on('listening', () => console.log("* WS server ready"));
@tdhsmith
tdhsmith / GC-solver-4.js
Created October 4, 2016 02:43 — forked from anonymous/GC-solver-4.js
Thrown-together solver for a geocaching puzzle
var magic = ["equals(caret(175.4, 203.9), caret(gt(37.8, 16.3), 19.5))",
"equals(equals(caret(gt(88.7, 66.4), 101.5), caret(72.3, 39.5)), 37.8)",
"equals(equals(equals(caret(22009.9, 10101.8), 7228.7), 368.7), gt(4138488.0, 4020319.0))",
"equals(caret(2066.8, 668.8), caret(12.9, gt(122.1, 8.4)))",
"equals(equals(caret(9999.9, 10375.2), caret(777.7, 37.9)), gt(96.8, 33.0))",
"equals(equals(equals(caret(98765.7, 3777.5), 667.7), 268.3), caret(586728.2, 412841.8))"];
// unambiguous "caret(22009.9, 10101.8) = 7228.7 = 368.7 = gt(4138488.0, 4020319.0)", ?
// "(98765.7 ^ 3777.5) = 667.7 = 268.3 = (586728.2 ^ 412841.8)" ?
@tdhsmith
tdhsmith / RequiredXorRuleProvider.php
Last active February 10, 2021 18:41
Laravel Validator rule extension for 'required_xor'
<?php
namespace App\Providers;
use Illuminate\Support\Arr;
use Illuminate\Support\ServiceProvider;
use InvalidArgumentException;
use Validator;
class RequiredXorRuleProvider extends ServiceProvider
{
@tdhsmith
tdhsmith / jwtauth_user_refs.dot
Last active February 10, 2016 22:37
Simplified flow for default user model interactions in JWTAuth
# http://www.graphviz.org/content/cluster
digraph G {
rankdir = LR;
splines = line;
subgraph cluster_package {
subgraph cluster_0 {
color=blue;
node [style=filled];
label = "JWT";
@tdhsmith
tdhsmith / pre-commit
Created November 17, 2015 20:07
Git pre-commit username check
#!/bin/bash
if [[ -z "$(git config user.name)" ]]; then
echo "Git username must be defined to commit!"
echo "(Are you running inside Vagrant/Homestead?)"
echo
exit 1
fi