Discover gists
| import struct | |
| import lzss # install pylzss, not lzss (requires initial buffer value argument) | |
| import os | |
| def readuntilnull(f): | |
| buf = b'' | |
| while True: | |
| data = f.read(16) | |
| offset = data.find(b'\0') |
- 1 feature branch, 1 working tree: merge all loose branches/stashes/uncommitted files into it & push. Delete branches already merged into it
- β ask user questions. Decide, act, report. Act autonomously
- Duplication = bug. Use deslop
- Important lints β error. Run static analysis routinely
- π§Ή After work: delete safe system caches & unneeded build files, kill your owned processes that eat CPU or memory and check disk space
- Refactors: violent, immediate, no back-compat. Legacy code banned β delete now
- Minimize code; decide toward less. Delete dead code now
- π¦ Minimize 3rd-party deps: routinely delete unused packages/crates, add none without need, consolidate overlapping deps into one, avoid those with a vulnerability history
- Reply β€2 sentences, emojis for emphasis. Don't stream responses
- β Tick mandatory plan checklist items as you work
| // custom auth endpoint: https://{PlayFabTitleId}.playfablogic.com/webhook/1/prod/{PhotonSecretKey}/CustomAuth | |
| // you can replace CustomAuth handler name and also in the URL | |
| // C# client snippet: | |
| // AuthenticationValues authValues = new AuthenticationValues(); | |
| // authValues.AuthType = CustomAuthenticationType.Custom; | |
| // Dictionary<string, object> data = new Dictionary<string, object>(6); | |
| // data["UserId"] = userId; // PlayFabId | |
| // data["AppId"] = appId; // Photon AppId | |
| // data["AppVersion"] = appVersion // Photon AppVersion | |
| // data["Ticket"] = ticket; // PlayFab auth session ticket |
| # Run Qwen 4 Max inside Claude Code via OpenRouter | |
| # From the video "Qwen 4 Max: I made it edit my video (setup + honest take)" | |
| # | |
| # 1. Create an OpenRouter API key (openrouter.ai β Workspaces β Keys β New key; set a credit limit) | |
| # 2. Paste this at the end of ~/.zshrc (macOS) and put your key in | |
| # 3. Run: source ~/.zshrc | |
| # 4. Start it with: claude-qwen (plain `claude` stays on your normal setup) | |
| # Use /effort to switch reasoning: low β low, medium/high β high, xhigh/max β extra high | |
| claude-qwen() ( # ( ) = subshell: these vars only apply to this run |
Iβve written a newer optimized 2026 version of this guide with a faster setup using Zinit + Starship and improved plugin loading.
This version avoids slow shell startups and works better with modern Zsh setups.
Updated guide: https://gist.github.com/n1snt/2cccc8aa5f7b645a7628d3512c70deb6
A pattern for building personal knowledge bases using LLMs.
This is an idea file, it is designed to be copy pasted to your own LLM Agent (e.g. OpenAI Codex, Claude Code, OpenCode / Pi, or etc.). Its goal is to communicate the high level idea, but your agent will build out the specifics in collaboration with you.
Most people's experience with LLMs and documents looks like RAG: you upload a collection of files, the LLM retrieves relevant chunks at query time, and generates an answer. This works, but the LLM is rediscovering knowledge from scratch on every question. There's no accumulation. Ask a subtle question that requires synthesizing five documents, and the LLM has to find and piece together the relevant fragments every time. Nothing is built up. NotebookLM, ChatGPT file uploads, and most RAG systems work this way.
These are NOT product / license keys that are valid for Windows activation.
These keys only select the edition of Windows to install during setup, but they do not activate or license the installation.

