Skip to content

Instantly share code, notes, and snippets.

@conundrumer
conundrumer / CLAUDE.md
Last active March 30, 2026 21:11
Claude Code config: statusline + CLAUDE.md

Rate Limit Usage

~/.claude/usage.json is continuously updated with current rate limit data across the user's entire Claude account:

  • used — percentage of quota consumed so far
  • elapsed — percentage of the window's total time that has passed; compare with used to assess pacing
  • resets_at — unix epoch (seconds) when the window resets
  • ttl — seconds until reset

Interaction Rules

  • When the user says "ack", confirm your understanding so they can verify you understood correctly and clarify if needed. The purpose is to ensure alignment before proceeding.
@conundrumer
conundrumer / vibemake.py
Created October 3, 2025 15:28
vibemake.py
"""Minimal Make-like build system"""
import os
from pathlib import Path
from typing import Callable, List
class Rule:
def __init__(self, target: str, deps: List[str], recipe: Callable):
self.target = target
self.deps = deps
self.recipe = recipe
@conundrumer
conundrumer / yt-ad-buster.js
Last active May 13, 2020 16:26
yt-ad-buster.js: Prevents a YouTube video from being used as an ad by toggling visibility when views from ad are detected.
/* yt-ad-buster.js: Prevents a YouTube video from being used as an ad by toggling visibility when views from ad are detected.
Usage:
Go to video "Details" page and run this script.
To stop, focus on main page and press Escape.
When running, the main page header should turn RED.
When stopped, the header should turn light blue.
If the main page is hidden in a tab, the automation may run slower.
If it runs too fast, YouTube will rate limit with 429 RESOURCE_EXHAUSTED errors.
*/
class AdBusterRunner {
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
function run() {
return _run.apply(this, arguments);
}
function _run() {
_run = _asyncToGenerator(function* () {
@conundrumer
conundrumer / yt-autotoggler.js
Last active April 16, 2020 16:54
Periodically toggles visibility of a YouTube video.
/* yt-autotoggler.js: Periodically toggles visibility of a YouTube video.
Usage:
Go to video "Details" page and run this script. Requires pop-ups.
To stop, focus on main page and press Escape.
When running, the main page header should turn violet.
When stopped, the headers should turn light blue.
If the main page is hidden in a tab, the automation may run slower.
If `baseInterval` is less than 4 seconds, YouTube will rate limit with 429 RESOURCE_EXHAUSTED errors.
*/
async function run() {
<b>test</b>
function cf (ps) {
ps = [...ps].reverse()
let x0 = 1
let i = 0
while (i++ < 10000000) {
let x1 = x0
for (let p of ps) {
x1 = p + 1 / x1
@conundrumer
conundrumer / lr-dragon-curve.js
Created August 7, 2018 01:02
generate a dragon curve
function* dragonCurveGen(startPoint, endPoint, maxIterations, left) {
const M = {
mult: (m, v) => [
m[0][0] * v[0] + m[0][1] * v[1],
m[1][0] * v[0] + m[1][1] * v[1]
],
minus: (u, v) => [u[0] - v[0], u[1] - v[1]],
plus: (u, v) => [u[0] + v[0], u[1] + v[1]],
left: [[0.5, -0.5], [0.5, 0.5]],
function sumNaive (n, acc = 0) {
if (n === 0) {
return acc
}
return sumNaive(n - 1, acc + n)
}
// console.log(sumNaive(1000))
// console.log(sumNaive(100000))
@conundrumer
conundrumer / speedometer.jsx
Created January 2, 2018 02:17
lrjs speedometer
import React from 'react'
import Vector from 'core/Vector'
function angleTo (u, v) {
return Math.atan2(u.cross(v), u.dot(v))
}
export default function Speedometer ({rider, prevRider, toolbarsOpen}) {
let style = {position: 'absolute', top: toolbarsOpen ? 40 : 0, right: 0, padding: 8, textAlign: 'right', fontFamily: 'monospace', backgroundColor: 'rgba(255,255,255,0.8)'}
let avgPos = rider.points.reduce((acc, {pos}) => acc.add(pos), new Vector(0, 0)).divS(rider.points.length)