Skip to content

Instantly share code, notes, and snippets.

@strayge
strayge / session-tokens.py
Last active July 20, 2026 04:08
Analytics for claude code / opencode / codex
#!/usr/bin/env python3
"""Report token usage from Claude Code transcripts, Codex CLI rollouts, or OpenCode SQLite."""
import argparse
import json
import math
import os
import re
import sqlite3
@strayge
strayge / starship.toml
Last active March 22, 2026 16:29
tide-like starship config
"$schema" = 'https://starship.rs/config-schema.json'
format = """
$os\
$username\
$hostname\
$localip\
$shlvl\
$singularity\
$kubernetes\
@strayge
strayge / gist:0daf9197e7b8a8f117efeddb38a931da
Created February 27, 2026 09:57
windows terminal config

insert into actions in settings.json

for enter:

{ "command": {"action": "sendInput", "input": "\u001b[13;2u" }, "keys": "shift+enter" },
{ "command": {"action": "sendInput", "input": "\u001b[13;5u" }, "keys": "ctrl+enter" },
{ "command": {"action": "sendInput", "input": "\u001b[13;6u" }, "keys": "ctrl+shift+enter" },

for space:

// ==UserScript==
// @name RGG Chess Stats
// @namespace http://tampermonkey.net/
// @version 2026-07-25
// @description Extra stats for each team in RGG Chess
// @author strayge
// @match https://rgg.land/checkers/season/s5
// @icon https://www.google.com/s2/favicons?sz=64&domain=rgg.land
// @grant none
// @updateURL https://gist.github.com/strayge/67aa73e55e1454b22c57a150aec16680/raw/rgg_chess_stats.user.js
// ==UserScript==
// @name RGG Chess Rewind
// @namespace http://tampermonkey.net/
// @version 2026-01-21
// @description Allow to rewind chess moves on RGG Land
// @author strayge
// @match https://rgg.land/checkers
// @match https://rgg.land/checkers/season/s4
// @icon https://www.google.com/s2/favicons?sz=64&domain=rgg.land
// @grant none
@strayge
strayge / ml.ipynb
Created November 13, 2023 14:36
just testing NN stuff
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@strayge
strayge / pybrew.py
Created September 18, 2023 20:12
CLI tool for search Homebrew packages and sort results by downloads
"""
CLI tool for search packages on Homebrew repository by provided keyword.
Results sorted by downloads count (last 90 days).
Requirements:
pip install httpx colorama
"""
import argparse
import json
from pathlib import Path
@strayge
strayge / sqlite.ipynb
Created March 1, 2023 07:54
python sqlite performance test
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@strayge
strayge / puzzle.ipynb
Created January 4, 2023 11:53
advent of code 2022 notes
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@strayge
strayge / goad_windows_wsl.sh
Created September 15, 2022 13:02
goad windows wsl
# from windows (example below with zsh syntax)
py -m pip install pywinrm
git clone https://github.com/Orange-Cyberdefense/GOAD.git
cd GOAD
VAGRANT_HOME=.vagrant_home vagrant up
# in case no port access for winrm
# https://stackoverflow.com/questions/54010365/how-to-see-what-is-reserving-ephemeral-port-ranges-on-windows
# from WSL2 (ubuntu)