Skip to content

Instantly share code, notes, and snippets.

View WisdomWolf's full-sized avatar

Ryan Beaman WisdomWolf

  • Aledade
  • Charlotte, NC
View GitHub Profile
@WisdomWolf
WisdomWolf / spire_seed_functions.py
Created May 22, 2020 21:05
Slay The Spire Seed Conversion Functions
def convert_seed_to_string(seed: int) -> str:
"""Converts numeric seed from run file to alphanumeric seed"""
char_string = string.digits + string.ascii_uppercase
# Convert to unsigned
leftover = seed = seed + 2**64 if seed < 0 else seed
char_count = len(char_string)
result = []
while leftover != 0:
remainder = leftover % char_count
#!/bin/bash
export LOG_FILE=pi_setup_$(date +%Y%m%d-%H%M).log
export ERR_FILE=pi_setup_errors_$(date +%Y%m%d-%H%M).out
exec > >(tee -ia $LOG_FILE)
exec 2> >(tee -ia $ERR_FILE)
[ "$UID" -eq 0 ] || exec sudo -E "$0" "$@"

Keybase proof

I hereby claim:

  • I am wisdomwolf on github.
  • I am wisdomwolf (https://keybase.io/wisdomwolf) on keybase.
  • I have a public key ASAMGtaSElXZpoI0xKiHjN5c69uUWdX2l9_8qNsRr4Pa3wo

To claim this, I am signing this object:

@WisdomWolf
WisdomWolf / generate-compose.sh
Created May 11, 2017 20:57 — forked from lalyos/generate-compose.sh
generate docker-compose.yml by inspecting a running container
docker-yml() {
docker inspect -f $'
{{.Name}}
image: {{.Config.Image}}
entrypoint: {{json .Config.Entrypoint}}
environment: {{range .Config.Env}}
- {{.}}{{end}}
' $1
}
@WisdomWolf
WisdomWolf / boxstarter.ps1
Last active May 27, 2018 18:57
Boxstarter Install Script
# Description: Boxstarter Script
# Author: Wisdom Wolf <wisdomwolf@gmail.com>
# Last Updated: 2018-05-27
#
#
# Based heavily on https://gist.github.com/jessfraz/7c319b046daa101a4aaef937a20ff41f
# and
# https://gist.github.com/CJKinni/de205822b0dddd2b18054fe7a29f72bc
#
# Install boxstarter: