Skip to content

Instantly share code, notes, and snippets.

View cheeseonamonkey's full-sized avatar
πŸ˜…
Sweating, and smiling

Alexander H cheeseonamonkey

πŸ˜…
Sweating, and smiling
View GitHub Profile
@cheeseonamonkey
cheeseonamonkey / choice_enum_scraper.py
Created December 17, 2025 03:14
choice hotels hidden services analysis?
#!/usr/bin/env python3
import re, time, json, gzip, argparse, hashlib, logging
from urllib.parse import urljoin, urlparse, parse_qs
from xml.etree import ElementTree as ET
from curl_cffi import requests
from curl_cffi.requests.exceptions import Timeout, RequestException
BASE = "https://www.choicehotels.com"
BROWSERS = ["chrome120", "chrome110", "safari17"]
@cheeseonamonkey
cheeseonamonkey / thing.html
Last active December 9, 2025 05:03
loading_tip_thing.html
<style>
body::after{
content:attr(data-q);
position:absolute;
top:10px;
right:-30px;
color:#e5e7eb;
font-size:13px;
font-weight:600;
@cheeseonamonkey
cheeseonamonkey / scraper.py
Created December 7, 2025 09:16
chord scraper
import csv, json, os, random, re, time
from typing import Optional
from curl_cffi import requests # pip install curl_cffi
from bs4 import BeautifulSoup
# --- CONFIGURATION ---
BATCH_SIZE = 500 # Lowered slightly to be safe
MIN_DELAY, MAX_DELAY = 12, 40
LONG_DELAY_CHANCE = 0.08 # 8% chance of a "coffee break"
LONG_DELAY_RANGE = (120, 300) # 2-5 minutes
@cheeseonamonkey
cheeseonamonkey / disk_compression_benchmarker.zsh
Last active December 7, 2025 03:40
transparent compression benchmarker (brtfs)
#!/usr/bin/env zsh
set -euo pipefail
SRC="/tmp/testfile.dat"
DEV="/dev/disk/by-id/scsi-0Linode_Volume_blk_vol"
MNT="/blk"
TMP="$MNT/.bench_tmp"
OPTS=("none" "lzo" "zlib:1" "zlib:5" "zlib:9" "zstd:1" "zstd:3" "zstd:6" "zstd:9" "zstd:15")
@cheeseonamonkey
cheeseonamonkey / rec_vad_vosk_agc.py
Created December 6, 2025 07:51
rec_vad_vosk_agc.py
#!/usr/bin/env python3
"""Record voice activity, apply light AGC, and transcribe with Whisper (English only)."""
import argparse
import json
import collections
import os
import queue
import threading
import time
@cheeseonamonkey
cheeseonamonkey / fetch.zsh
Created December 6, 2025 07:50
custom fetch
#!/usr/bin/env zsh
# Custom fetch script (zsh only)
# - jp2a image (color, more detail)
# - 2-column layout: system (left), misc/fun stats (right)
set -u
set +x 2>/dev/null || true # disable xtrace so lv/rv lines don't print
# -------------------- Colors / formatting --------------------
@cheeseonamonkey
cheeseonamonkey / dump_x_xfce.zsh
Created December 3, 2025 15:48
dump xfce DE config
dump_x_xfce() {
# colors
local H="$(tput setaf 6)" # cyan
local S="$(tput setaf 3)" # yellow
local E="$(tput setaf 1)" # red
local N="$(tput sgr0)"
echo "${H}### X / XFCE Context Dump ###${N}"
echo
@cheeseonamonkey
cheeseonamonkey / recompress_android_apk.zsh
Last active November 17, 2025 12:05
re-compress apk
#!/bin/bash
recompress_apk() {
local dry_run=0 png_opt=6 jpg_q=70 zip_lv=9 webp_q=85 use_webp=0 use_7z=0 zopfli_i=50 advzip_i=100 lossy_png=0
while [[ $# -gt 0 ]]; do
case "$1" in
-d|--dry-run) dry_run=1; shift ;;
-p|--png-opt) png_opt=$2; shift 2 ;;
-j|--jpg-quality) jpg_q=$2; shift 2 ;;
-z|--zip-level) zip_lv=$2; shift 2 ;;
@cheeseonamonkey
cheeseonamonkey / fix-pip.sh
Created October 29, 2025 10:28 — forked from felipealfonsog/fix-pip.sh
Removing Python's EXTERNALLY-MANAGED lock
#!/usr/bin/env bash
echo "──────────────────────────────────────────────"
echo " Removing Python's EXTERNALLY-MANAGED lock "
echo "──────────────────────────────────────────────"
echo "* Developed and engineered by:"
echo "* Felipe Alfonso Gonzalez <f.alfonso@res-ear.ch>"
echo "* Computer Science Engineer"
echo "* Chile"
echo "------------------------------------------------"
@cheeseonamonkey
cheeseonamonkey / chessFetchers.js
Last active September 24, 2025 01:41
Get chess.com games of username
// fetch archives of a username
async function fetchUserArchives(username) {
const url = `https://api.chess.com/pub/player/${username}/games/archives`;
const response = await fetch(url);
const data = await response.json();
return data.archives;
}
// fetch games from an archive
async function fetchArchiveGames(username, month, year) {