Skip to content

Instantly share code, notes, and snippets.

View notwa's full-sized avatar
🚲
bikeshedding

Connor notwa

🚲
bikeshedding
View GitHub Profile
@notwa
notwa / tennis.c
Last active June 4, 2018 18:14
Mario Tennis (N64) Ring Tournament code generator
// arbitrary terminology i made up on the spot:
// "entry" = code as exposed to user, in ASCII.
// "code" = code as indices into lut, used internally.
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
typedef uint32_t u32;
@notwa
notwa / ac_encode.py
Last active September 11, 2018 21:03
Arithmetic coding
# Arithmetic coding compressor and decompressor for binary strings.
# via: http://www.inference.org.uk/mackay/python/compress/ac/ac_encode.py
# main page: http://www.inference.org.uk/mackay/python/compress/
# this has been cleaned up (passes pycodestyle) and ported to python 3.
# default prior distribution
BETA0 = 1
BETA1 = 1
M = 30
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@notwa
notwa / colors.txt
Last active November 1, 2022 08:34
trackmogrify
indianRed
lightCoral
salmon
darkSalmon
lightSalmon
crimson
red
fireBrick
darkRed
pink
@notwa
notwa / names.txt
Last active January 7, 2020 12:53
Tony Hawk's Pro Skater 1 Tyr glitch names
AANGELEG -> HRFXKLYVFFB
AANGENOMENEN -> HRFXKNRIKZO
AANGEROL -> HRFXKRDKWTV
AANSTUIVING -> HRFIIVUPSXT
AANTRAD -> HRFJBNGVICJ
AARSKOERNING -> HRJVLROLITS
AARTSBRO -> HRJWHOVNTOG
AASE -> HRKWLPTIGOG
ABADIA -> HSH BLGXZSU
ABAISSERA -> HSHEKHWJVEX
# dead simple dictionary attack for fixed-length passwords.
# this is far from optimal.
from collections import defaultdict
import argparse
import sys
import random
program = sys.argv[0]
args = sys.argv[1:]
40c40
< 00000270: a040 009f 3c0e 8080 25ce 32f8 240f 2410 .@..<...%.2.$.$.
---
> 00000270: a040 009f 3c0e 8083 25ce df6c 240f 00e0 .@..<...%..l$...
@notwa
notwa / cc.txt
Last active November 2, 2018 16:50
// color combiner arguments:
// source | RGB | Alpha | official name
// | (a - b)* c + d | (A - B)* C + D |
// CC.COLOR_OUT | 0 0 0 0 | --- --- --- --- | COMBINED
// CC.COLOR_TEXEL_0 | 1 1 1 1 | --- --- --- --- | TEXEL0
// CC.COLOR_TEXEL_1 | 2 2 2 2 | --- --- --- --- | TEXEL1
// CC.COLOR_PRIM | 3 3 3 3 | --- --- --- --- | PRIMITIVE
// CC.COLOR_SHADE | 4 4 4 4 | --- --- --- --- | SHADE
// CC.COLOR_ENV | 5 5 5 5 | --- --- --- --- | ENVIRONMENT
// CC.KEY_CENTER | --- 6 --- --- | --- --- --- --- | CENTER
@notwa
notwa / lsca.uni.py
Last active January 20, 2019 07:41
#!/usr/bin/env python3
import sys
import numpy as np
def lament(*args, **kwargs):
return print(*args, file=sys.stderr, **kwargs)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.