Skip to content

Instantly share code, notes, and snippets.

View dschuetz's full-sized avatar

David Schuetz dschuetz

View GitHub Profile
#include <dummy.h>
/*
David Schuetz @DarthNull
March, 2021
Minimal MQTT Interface for AdaFruit NeoTrellis 16-key keypad
Includes elements from:
@dschuetz
dschuetz / codenames.py
Created March 28, 2021 19:50
Board generator for the game Codenames - supports arbitrary sizes and up to 5 teams
#!/usr/bin/python
# David Schuetz
# March, 2021
#
# Generates a secret Codenames board.
# For an explanation of just WTF this is for, see my blog post:
# https://darthnull.org/fun/2021/03/codenames-board-generator/
#
#
# Demonstrating kSecKeyAlgorithmECIESEncryptionCofactorX963SHA256AESGCM
#
# David Schuetz (@DarthNull)
# May 2018
#
# see also: https://darthnull.org/security/2018/05/31/secure-enclave-ecies
#
###############################################################
@dschuetz
dschuetz / ascii_score.py
Last active August 29, 2015 14:05
Simple scoring routine for ascii text. Uses Moby Dick as a source for ascii frequencies (only chars 32-127).
ASCII_FREQS = [
162.7, 1.5, 2.6, 0.0, 0.0, 0.0, 0.0, 2.4,
0.2, 0.2, 0.1, 0.0, 16.0, 5.0, 6.5, 0.0,
0.1, 0.2, 0.1, 0.0, 0.0, 0.1, 0.0, 0.1,
0.1, 0.0, 0.2, 3.4, 0.0, 0.0, 0.0, 0.8,
0.0, 2.2, 1.2, 1.0, 0.7, 1.1, 0.7, 0.6,
1.2, 3.0, 0.2, 0.2, 0.8, 0.6, 1.0, 0.9,
1.0, 0.3, 0.7, 1.9, 2.1, 0.2, 0.1, 1.1,
0.0, 0.3, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
0.0, 62.8, 12.9, 18.1, 31.3, 97.0, 16.8, 16.9,
@dschuetz
dschuetz / git_prompt
Last active August 29, 2015 14:04
Pretty-print prompt when in a git repo
#
# 25 jul 2014
#
# display the current git repository and some important stats in the shell prompt
#
# stick this in bashrc or wherever such tweaks are executed.
#
# Most code taken from http://vvv.tobiassjosten.net/bash/dynamic-prompt-with-git-and-ansi-colors/
#
# tweaked to put on a couple of lines, along with an edited directory path prompt
@dschuetz
dschuetz / make_passbook.py
Created May 31, 2014 03:43
Simple hack to create Passbook .pkpass file
import sys, os.path, hashlib, re
import zipfile
import subprocess
from StringIO import StringIO
from io import BytesIO
#
# Passbook Hack
# David Schuetz
# 30 May 2014
@dschuetz
dschuetz / gtb
Last active August 2, 2022 10:32
Hackish script to compute Google Authenticator tokencodes and launch a Tunnelblick VPN with the appropriate computed password+tokencode
#!/usr/bin/python
import hmac, struct, time, base64, hashlib # for totp generation
import re, sys, subprocess # for general stuff
from getopt import getopt, GetoptError # pretending to be easy-to-use
#
# gtb - Google(auth) + Tunnelblick
#

Keybase proof

I hereby claim:

  • I am dschuetz on github.
  • I am DarthNull (https://keybase.io/DarthNull) on keybase.
  • I have a public key whose fingerprint is CC14 1551 08AC 5097 FF33 DC45 85D0 5CE0 ED5B E191

To claim this, I am signing this object: