| name | revise |
|---|---|
| description | Load before writing or editing any file. |
| allowed-tools | Agent Read Edit |
While writing or editing prose: keep the catalog below in mind and avoid those failure modes in your draft.
~/.claude/usage.json is continuously updated with current rate limit data across the user's entire Claude account:
used — percentage of quota consumed so farelapsed — percentage of the window's total time that has passed; compare with used to assess pacingresets_at — unix epoch (seconds) when the window resetsttl — seconds until reset| """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 |
| /* 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* () { |
| /* 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 |
| 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)) |