Skip to content

Instantly share code, notes, and snippets.

View garrettjoecox's full-sized avatar

Garrett Cox garrettjoecox

View GitHub Profile
@garrettjoecox
garrettjoecox / readlines.ts
Created December 18, 2023 00:50
readLines usage
import { readLines } from "https://deno.land/[email protected]/io/read_lines.ts";
(async function processStdin() {
try {
for await (const line of readLines(Deno.stdin)) {
const [command, ...args] = line.split(" ");
switch (command) {
default:
case "help": {
@garrettjoecox
garrettjoecox / seqReplace.c
Last active May 21, 2025 03:07
Dumb Sequence Replacement PoC
// This was obtained by unzipping an MMRS file and copying the hex contents from the .seq file
// From the few I looked at, they all seem to start with 0xd3, 0x20, 0xd5, and end with 0xFF
unsigned char seq[] = {
0xd3, 0x20, 0xd5, 0x32, 0xd7, 0x0a, 0x93, 0x90,
0x00, 0x4d, 0x91, 0x00, 0x5a, 0x94, 0x00, 0x67,
0x97, 0x00, 0x77, 0x99, 0x00, 0x87, 0x9b, 0x00,
0x94, 0xdb, 0x58, 0xdd, 0x6b, 0xfd, 0x83, 0x78,
0xdd, 0x6a, 0xfd, 0x18, 0xdd, 0x69, 0xfd, 0x18,
0xdd, 0x67, 0xfd, 0x18, 0xdd, 0x66, 0xfd, 0x18,
0xdd, 0x64, 0xfd, 0x18, 0xdd, 0x61, 0xfd, 0x18,