Skip to content

Instantly share code, notes, and snippets.

@llamasoft
llamasoft / kindred.md
Created March 14, 2026 17:47
MTG Kindred Commander Stats

A "kindred commander" is a commander that interacts with the specified creature type in any way, regardless of the commander's own subtypes.
For example, despite there being no Balloon creature cards, The Jolly Balloon Man is a Balloon kindred commander even though it's a Human Clown.

Caveats

  • Data was generated on 2026-03-14. Counts will likely change over time.
  • Card data was sourced from MTGJSON.com which may not 100% align with Scryfall.
  • The counts below included additional processing, such as excluding kindred commanders who incidentally have a creature type in their name.
    • e.g. Scion of the Ur-Dragon does not count as a Scion kindred commander even though it appears in the search results.
  • Only creature types mentioned in section 205.3m of the comprehensive rules are included.
@llamasoft
llamasoft / hash_xor_zero.py
Last active April 26, 2023 00:16
Finding hashes that XOR to zero
import hashlib
import os
import numpy as np
import galois
GF = galois.GF(2)
# This script works for any hash algorithm!
hash_algo = hashlib.sha256
@llamasoft
llamasoft / plot-o-matic.sh
Last active June 8, 2021 20:25
Chia Plotter
#!/usr/bin/env bash
######################## REQUIRED ENVIRONMENT VARIABLES ########################
# FARMER_PUBKEY
# The farmer public key used to generate the plots.
# POOL_PUBKEY
# The pool public key used to generate the plots.
# SCRATCH_DIR
# An existing directory where plotters put their temp files.
# WRANING: Everything under this directory will be deleted.
@llamasoft
llamasoft / httpy.yaml
Created May 13, 2020 20:41
A short, simple Istio traffic splitting demo.
apiVersion: v1
kind: ConfigMap
metadata:
name: httpy-files
data:
server.py: |
import http.server
import os
import socket
import json
@llamasoft
llamasoft / destiny_list.sh
Created March 6, 2020 18:39
Fetches and parses the Destiny 2 assets library into a wordlist.
# Fetching the Destiny 2 manifest definition
api_key=""
if [[ -n "${api_key}" ]]; then
curl --compressed "https://www.bungie.net/Platform/Destiny2/Manifest/" -H "x-api-key: ${api_key}" -o "manifest.json"
# Extracting the name of the aggregated JSON asset database.
aggregate_path=$(jq --raw-output '.Response.jsonWorldContentPaths.en' "manifest.json")
else
@llamasoft
llamasoft / build_nwjs_arm.sh
Last active January 4, 2025 06:52
Script for building NW.js for an ARM device.
#!/usr/bin/env bash
set -e
FIRST_RUN=1
BUILD_ARM=1
BUILD_SDK=1
BUILD_NACL=1
NWJS_BRANCH="nw44"
@llamasoft
llamasoft / quote_demo.py
Last active September 27, 2019 16:47
HVAC URL Escape Demo
import hvac
import pprint
import six.moves.urllib.parse as urllib
client = hvac.Client("http://localhost:8200")
def quote_path(path):
"""Returns a string that's safe to use as a path."""
# Yes, safe = "/" is the default, but I pass it here just to make it obvious.
@llamasoft
llamasoft / clobber_demo.py
Created September 27, 2019 00:43
HVAC Clobber Demo
import hvac
import pprint
client = hvac.Client("http://localhost:8200")
# Make sure the test user doesn't exist
client.secrets.identity.delete_entity_by_name("clobber-demo")
# Create the user with a set of policies and metadata
client.secrets.identity.create_or_update_entity_by_name(
@llamasoft
llamasoft / hibp_freq.sh
Created April 2, 2018 16:44
HaveIBeenPwned Found Plaintext Frequency
#!/usr/bin/bash
# Use bytewise locale, this provides performance benefits and prevents possible UTF8 warnings
export LC_ALL="C"
# `plains.txt` is the "found" list from Hashes.org
# https://hashes.org/leaks.php?id=515
# `HIBP_hashcount.txt` is the Version 2 *ordered by hash* list from haveibeenpwned.com
# https://haveibeenpwned.com/Passwords
# This perl snippet regenerates the SHA1 hash from the plaintext.
@llamasoft
llamasoft / firmware_bug.gcode
Last active April 29, 2018 04:24
G-code or firmware bug on Wanhao Duplicator i3 Plus
; NOTE: hotend must be preheated otherwise extruder retract is ignored!
; Monoprice Maker Select Plus/Wanhao Duplicator i3 Plus
; =========================================================
; An extruder retract in relative positioning causes
; the X axis to no longer be able to home.
; Disabling the motors fixes the bug.
M117 Homing and moving to known position