Skip to content

Instantly share code, notes, and snippets.

View ProdigySim's full-sized avatar

Michael Busby ProdigySim

View GitHub Profile
@ProdigySim
ProdigySim / sgspread_linux.asm
Last active January 13, 2021 20:48
Previous iteration of sgspread patch
0: 8d 8d 54 ff ff ff lea ecx,[ebp-0xac]
6: f3 0f 11 01 movss DWORD PTR [ecx],xmm0
a: 8b 55 20 mov edx,DWORD PTR [ebp+0x20]
d: 8b c4 mov eax,esp
f: 83 fa 04 cmp edx,0x4 ; "Bullet offset 0"
12: 7f 02 jg 0x16
14: eb 16 jmp 0x2c
16: 89 10 mov DWORD PTR [eax],edx
18: 01 38 add DWORD PTR [eax],edi
/* TerrorNavArea::SpawnAttributeFromString(char const*) */
uint TerrorNavArea::SpawnAttributeFromString(char *param_1)
{
char cVar1;
int iVar2;
uint uVar3;
@ProdigySim
ProdigySim / enquirer-names-and-types.patch
Created April 25, 2022 16:31
First pass at enabling inferred names and types on output answers object for enquirer library
diff --git a/module-type-overrides/enquirer.d.ts b/module-type-overrides/enquirer.d.ts
index 27dee4e90..5172f0c5c 100644
--- a/module-type-overrides/enquirer.d.ts
+++ b/module-type-overrides/enquirer.d.ts
@@ -67,6 +67,21 @@ declare namespace Enquirer {
...args: ConstructorParameters<new (...args: any) => T>
) => T;
+ export function prompt<Name extends string, Q extends prompt.Question>(
+ question: Q & { name: Name }
@ProdigySim
ProdigySim / getsetdata.js
Last active December 1, 2025 16:49
Run this snippet in browser console to get Set subsection metadata from scryfall set pages
Array.from(document.querySelectorAll(".card-grid-header-content"))
.map((h, idx) => {
const title = Array.from(h.childNodes)
.find(n => n.nodeType === Node.TEXT_NODE)
?.textContent.trim();
const searchLink = h.querySelector('a')?.getAttribute("href");
const query = new URLSearchParams(searchLink?.split('?')[1]).get('q');
return {title, query}
});