Skip to content

Instantly share code, notes, and snippets.

@quidmonkey
quidmonkey / .prautopilotrc
Last active October 27, 2026 16:06
Bye-Bye PR Ceremony Script
# pr-autopilot config. One entry per line; "#" starts a comment.
# Repos to scan. By default PRs are approved and squash-merged.
# Optionally add a mode after a repo to change that for that repo only:
# approve-only approve, never merge (something else merges)
# atlantis Terraform repos merged by Atlantis: approve, then comment
# "atlantis apply -d <folder>" per changed Terraform folder, root first, one at a time
[repos]
git@github.com:procore/frontier-model-service.git
git@github.com:procore/vertex-sft.git
@quidmonkey
quidmonkey / model-recos.md
Last active August 14, 2026 20:26
local model research running on ollama

Local Model Recommendations: Pi + Ollama

Findings for running a local coding agent (Pi CLI, via Ollama's OpenAI-compatible endpoint) at six memory budgets: 8, 12, 16, 20, 24, 28 GB.

Criteria

  • Total memory (model weights + KV cache at the listed context) fits the budget
  • Mixture-of-experts (MoE) preferred over dense
  • Multi-token prediction (MTP) preferred, if available
  • Must run in Ollama
@quidmonkey
quidmonkey / whoiswinning.sh
Created July 14, 2026 15:10
Who is winning?
# display git authors, commits, added lines, deleted lines
function who_is_winning {
git log --format='author %aN' --numstat | awk '
/^author / { author = substr($0, 8); commits[author]++; next }
NF == 3 { add[author] += $1; del[author] += $2 }
END {
printf "%-30s %8s %10s %10s\n", "Author", "Commits", "Added", "Deleted"
for (n in commits) printf "%-30s %8d %10d %10d\n", n, commits[n], add[n], del[n] | "sort -rn -k1.31"
}'
}
@quidmonkey
quidmonkey / docker-compose.yml
Created June 26, 2026 11:09
DNS Hosting + JellyFin/*Arr Stack
services:
# ---------------------------------------------------------------------------
# Gluetun — VPN gateway (ProtonVPN via WireGuard). qBittorrent routes through
# this container's network. If Gluetun dies, qBittorrent loses all network =
# no IP leak.
# ---------------------------------------------------------------------------
gluetun:
image: qmcgaw/gluetun:latest
container_name: gluetun
cap_add:
@quidmonkey
quidmonkey / claudesearch
Created April 24, 2026 16:37
Search past Claude conversations for keywords e.g. claudesearch -h
claudesearch() {
if [[ "$1" == "-h" || "$1" == "--help" || $# -eq 0 ]]; then
echo "Usage: claudesearch <keyword> [keyword2 ...]"
echo " claudesearch -r <session-id>"
echo ""
echo "Options:"
echo " -h Show this help"
echo " -r <id> Resume a session by ID"
echo ""
echo "Examples:"
@quidmonkey
quidmonkey / main.js
Last active June 15, 2025 20:38
Nodejs Postgres Migrations with Multi-Schema Support in the vein of the postgres-migrations lib
const minimist = require('minimist);
Const { migrateAll } = require('./migrate');
const args = require('minimist')(process.argv.slice(2));
const dir = args.dir;
if (!dir) {
console.error('Usage: node migrate.js --dir <migrationsDir>');
process.exit(1);
}
@quidmonkey
quidmonkey / db.ts
Last active June 9, 2025 12:30
Nodejs SQL Querying (node-pg) with Schemas/Types (zod), Error Handling, Logging, String Interpolation, and No ORM
import { Pool } from 'pg';
import { ZodSchema } from 'zod';
// Initialize the database connection pool
const pool = new Pool({
user: 'your_db_user',
host: 'localhost',
database: 'your_db_name',
password: 'your_password',
port: 5432,
@quidmonkey
quidmonkey / numberMap.js
Created August 9, 2023 12:52
Map a Number from One Value System to Another
Number.prototype.map = (istart, istop, ostart, ostop) => {
return ostart + (ostop - ostart) * ((this - istart) / (istop - istart));
};
const map = (value, istart, istop, ostart, ostop) => {
return ostart + (ostop - ostart) * ((value - istart) / (istop - istart));
};
@quidmonkey
quidmonkey / async-loops.js
Created January 10, 2019 17:00
Async Loop Example
const sleep = async ms => new Promise(
resolve => setTimeout(() => {
console.log('~~~ Slept for', ms, 'ms')
resolve()
}, ms)
)
const of = async range => {
for (const ms of range) {
await sleep(ms)
@quidmonkey
quidmonkey / reduce.js
Last active March 16, 2018 00:43
Various JavaScript Implementations of Reduce
// utils
// unit test - assert 2 values are equal
const assert = (assertion, actual, expected) => {
console.log('~~~', assertion, ':', actual === expected);
};
// clone a value
// objects are only shallow cloned
const clone = (val) => {