Skip to content

Instantly share code, notes, and snippets.

View dado3212's full-sized avatar

Alex Beals dado3212

View GitHub Profile
@dado3212
dado3212 / gist:c226914a867070d368536c44eb4c4c77
Last active October 16, 2026 18:22
add_smart_quotes.py
#!/usr/bin/env python3
"""Bake smart quotes into a font via a `calt` (contextual alternates) feature.
Build ViridianPro (run from ~/Desktop/Fonts):
"$(brew --prefix fonttools)/libexec/bin/python" add_smart_quotes.py CrimsonPro-VariableFont_wght.woff2 ViridianPro.woff2 --punct-from SortsMillGoudy-Regular.ttf --thin-quotes 0.8 --dot-scale 1.05 --period-dots Ï
Straight " and ' become curly quotes at render time, like
https://cirw.in/blog/smart-quotes. `calt` is on by default in every browser,
so no CSS is needed.
@dado3212
dado3212 / auto_calc.c
Created September 26, 2026 16:51
Astra reverse engineering auto_calc script for NPC skill leveling in Skyrim
/* Skyrim LE 1.9.32.0: readable reconstruction, NOT Bethesda source.
*
* Sources: evidence/autocalc-{distribution,add,main,sort}-assembly.txt.
* Native 0x00561CF0 receives levelMinusOne in EAX and the NPC in ESI;
* Ghidra's four-parameter declaration omits those register inputs.
* Here those inputs, the cached cap, and the virtual current-value getter
* are explicit. Structs below model relevant fields, NOT native layouts.
* Call with entryCount=18 for skills; the original helper also handles
* health/magicka/stamina actor values 24/25/26.
*/
@dado3212
dado3212 / leveling_chart.txt
Created September 25, 2026 21:47
Speed leveling pickpocket in 15 coinflip steals with Imedhnain
| # | Skill | Perks unlocked | Perk bonus | Multiplier | Max gold | Chance | Skill after | Char level after |
|---:|------:|:--------------------------|-----------:|:-------------|---------:|-------:|------------:|-----------------:|
| 1 | 15 | Light Fingers 1 | 20 | x1.63 gear | 356 | 49.58% | 20 | 1 |
| 2 | 20 | Light Fingers 2 | 40 | x1 (none) | 492 | 49.55% | 25 | 2 |
| 3 | 25 | | 40 | x1 (none) | 542 | 49.55% | 30 | 3 |
| 4 | 30 | Night Thief | 65 | x0.75 Ataxia | 894 | 49.51% | 37 | 5 |
| 5 | 37 | | 65 | x0.75 Ataxia | 964 | 49.51% | 43 | 6 |
| 6 | 43 | Light Fingers 3, Cutpurse | 135 | x0.75 Ataxia | 1,957 | 49.54% | 52 | 8 |
| 7 | 52 |
@dado3212
dado3212 / ridethebus.py
Created September 7, 2026 20:29
Ride the Bus testing v2.0
import itertools, random
from statistics import mean, median, pstdev
suits = ["Spades", "Diamonds", "Hearts", "Clubs"]
values = ["Ace", "2", "3", "4", "5", "6", "7", "8", "9", "10", "Jack", "Queen", "King"]
class InfiDeck:
def __init__(self):
self.deck = self.new_deck()
self.new_decks = 0
@dado3212
dado3212 / ridethebus.py
Created September 7, 2026 20:28
Ride the Bus testing v2.0
import itertools, random
from statistics import mean, median, pstdev
suits = ["Spades", "Diamonds", "Hearts", "Clubs"]
values = ["Ace", "2", "3", "4", "5", "6", "7", "8", "9", "10", "Jack", "Queen", "King"]
class InfiDeck:
def __init__(self):
self.deck = self.new_deck()
self.new_decks = 0
@dado3212
dado3212 / commands.md
Created June 23, 2026 06:15
Denon AVR-X1700H Commands

"All Zone Stereo"

GetAllZoneStereo

Payload:

<?xml version="1.0" encoding="utf-8"?>
<tx>
  <cmd id="1">GetAllZoneStereo</cmd>
</tx>
@dado3212
dado3212 / requirements.txt
Created May 23, 2025 11:44
Script for selecting everything in automation
pyobjc
@dado3212
dado3212 / Info.plist.txt
Last active May 23, 2025 22:26
Shortcuts.app Info.plist for deeplink schemes (part of writeup at https://blog.alexbeals.com/posts/reverse-engineering-ios-deeplinking-for-shortcuts)
shortcuts-production
shortcuts
workflow
workflow000000
workflow1B9AF7
workflow7B72E9
workflow49E845
workflow55DAE1
workflow3871DE
workflow19BD03
@dado3212
dado3212 / search_sqlite_for_column.py
Created January 31, 2025 08:42
Search all tables in a SQLite database for a specific column
import sqlite3
def search_in_all_tables(db_path, text):
conn = sqlite3.connect(db_path)
cursor = conn.cursor()
cursor.execute("SELECT name FROM sqlite_master WHERE type='table'")
tables = [t[0] for t in cursor.fetchall()]
results = []
for table in tables:
@dado3212
dado3212 / hp1gba_text_decrypt.lua
Created December 16, 2024 02:27
Extracts all of the strings from the Harry Potter 1 game for GBA
function decompressString(memoryOffset)
-- this is 0x0300064C in IWRAM and is updated when you change languages
local englishOffset = 0x0804BFD8
local position = memory.read_u8(memoryOffset)
local totalString = ""
local cap = 0
local bitCounter = 0
while cap < 9000 do