See how a minor change to your commit message style can make you a better programmer.
Format: <type>(<scope>): <subject>
<scope> is optional
| set-option -g mouse on | |
| bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'copy-mode -e'" | |
| # Resize panes with arrow keys because alt-arrow keys doesn't work | |
| bind-key -r Up resize-pane -U | |
| bind-key -r Down resize-pane -D | |
| bind-key -r Left resize-pane -L | |
| bind-key -r Right resize-pane -R |
| class objectview(object): | |
| """Convert dict(or parameters of dict) to object view | |
| See also: | |
| - https://goodcode.io/articles/python-dict-object/ | |
| - https://stackoverflow.com/questions/1305532/convert-python-dict-to-object | |
| >>> o = objectview({'a': 1, 'b': 2}) | |
| >>> o.a, o.b | |
| (1, 2) |
| echo 50 | sudo tee /sys/class/backlight/intel_backlight/brightness | |
| or | |
| echo 50 | sudo tee /sys/class/backlight/acpi_video0/brightness |
| import time | |
| from androidhelper import Android | |
| droid = Android() | |
| droid.batteryStartMonitoring() | |
| time.sleep(5) | |
| bdata = droid.readBatteryData() | |
| print(bdata.result) | |
| bstatus = droid.batteryGetStatus().result | |
| bhealth = droid.batteryGetHealth().result |
| KEYMAPOPTS="us us" | |
| HOSTNAMEOPTS="-n alpine" | |
| INTERFACESOPTS="auto lo | |
| iface lo inet loopback | |
| auto eth0 | |
| iface eth0 inet dhcp | |
| hostname alpine | |
| " | |
| TIMEZONEOPTS="-z UTC" |
All packages, except for Tini have been added to termux-root. To install them, simply pkg install root-repo && pkg install docker. This will install the whole docker suite, left only Tini to be compiled manually.
| from langchain.agents import create_agent | |
| from langchain.agents.middleware import ModelFallbackMiddleware | |
| agent = create_agent( | |
| # simulate model failure w/ a typo in the model name (404) | |
| model="anthropic:claude-sonnet-with-typo", | |
| middleware=[ | |
| ModelFallbackMiddleware("openai:gpt-4o-with-typo", "openai:gpt-4o-mini") | |
| ], |
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.