Skip to content

Instantly share code, notes, and snippets.

View spencerpogo's full-sized avatar

Spencer Pogorzelski spencerpogo

View GitHub Profile
@spencerpogo
spencerpogo / duelbasicstrategy.user.js
Created September 23, 2026 00:49
Duel Blackjack Basic Strategy helper userscript helps you always follow basic strategy when playing Duel blackjack. The script provides visual feedback when hovering each action button indicating whether that action is correct. This provides assistance while still allowing the user to test their basic strategy knowledge.
// ==UserScript==
// @name Duel Blackjack Basic Strategy
// @namespace spencerpogo.com
// @icon
// @version 1.0.0
// @run-at document-start
// @match https://duel.com/blackjack
// @grant none
//
// @author spencerpogo
@spencerpogo
spencerpogo / shell.nix
Created September 3, 2025 17:42
Nix setup for MIT 6.1810 lab tools
{
pkgs ? import <nixpkgs> { },
}:
let
targetTriple = "riscv64-unknown-linux-gnu";
pkgsCross = import <nixpkgs> {
crossSystem = {
config = targetTriple;
@spencerpogo
spencerpogo / lib.rs
Created June 16, 2025 23:27
serde valuable wip
#[allow(unused_variables, unreachable_code)]
mod random {
use serde::{
Serialize, Serializer,
ser::{
SerializeMap, SerializeSeq, SerializeStruct, SerializeStructVariant, SerializeTuple,
SerializeTupleStruct, SerializeTupleVariant,
},
};
import sys
from elftools.elf.elffile import ELFFile
from elftools.elf.sections import SymbolTableSection
from relocation import RelocationHandler
from elftools.elf.enums import ENUM_RELOC_TYPE_x64
from elftools.elf.constants import SHN_INDICES
from binascii import hexlify
from io import BytesIO
# from pwn import disasm
// ==UserScript==
// @name ReMarkable Upload Button
// @namespace http://tampermonkey.net/
// @version 2023-12-16
// @description Add upload button to ReMarkable web interface
// @author You
// @match http://10.11.99.1/
// @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant none
// @run-at document-body
@spencerpogo
spencerpogo / README.md
Created May 13, 2024 23:44
Canvas Cengage WebAssign open in same tab userscript

If you can sign into webassign by opening a canvas assignment and clicking a button like this: open webassign button

then this userscript will make that button open in the same tab instead of in a new window.

How to use:

  1. Install tampermonkey
  2. Click on it's icon > Create New Script
  3. Paste contents of userscript.js
  4. Change the @match line of the script to start with your canvas instance's URL
@spencerpogo
spencerpogo / README.md
Last active May 1, 2024 05:19
Firefox query YouTube tabs

How to use

  1. Have devtools.chrome.enabled enabled in your about:config
  2. Press Ctrl + Shift + J to open the browser console
  3. Run snippet.js in the resulting console
  4. The result will be a list of [title, videoId] tuples
  5. You can use this no-dependency, synchronous script to export the result to a CSV Using clipboard to enter it makes the console lag, so you can fetch then eval it:

eval(await (await fetch("https://raw.githubusercontent.com/adaltas/node-csv/master/packages/csv-stringify/dist/iife/sync.js")).text())

@spencerpogo
spencerpogo / README.md
Created April 7, 2024 22:00
C interpreter shell script

Shell script to interpret C

I use this script to run C snippets quickly on the commandline, for example to print constants, offsets, or sizes when working in other languages.

If you want to add it to a bin folder, it might be useful to add "$(basename "$0")" "$@" to the bottom and making symbolic links for each function.

@spencerpogo
spencerpogo / README.md
Created December 20, 2023 02:55
drawj2d remarkable notebook output

The drawj2d reMarkable notebook output wasn't working for me, so I wrote a script that patches the output to be in the newer format.

Tested on reMarkable version 3.8.3.1976.

Usage:

First, edit drawj2d command in the python file to match your installation.

python3 drawj2d_rm_patcher.py ./hello.txt Hello
@spencerpogo
spencerpogo / focus.sh
Created January 4, 2023 05:50
i3-resurrect saver
shouldmatchtitle () {
case "$1" in
discord | VSCodium)
return 0
;;
*)
return 1
;;
esac