Discover gists
Requirements: Termux, Root (preferably Magisk).
Open termux and give it root permissions
Type su to escalate the permissions
Now enter the command dd if=/dev/zero of=swapfile bs=1024 count=6144k replacing 6144k with as much swap as you need, in this case 6GB
Once its done, enter mkswap swapfile to create the sawp file and swapon swapfile to enable the swap file
git log --graph --oneline --decorate ( git fsck --no-reflog | awk '/dangling commit/ {print $3}' )This will show you all the commits at the tips of your commit graph which are no longer referenced from any branch or tag – every lost commit, including every stash commit you’ve ever created, will be somewhere in that graph.
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.
Create a bookmarklet in your favourite browser with the URL being:
javascript:document.querySelectorAll("div.title a[rel=noopener]").forEach(function(url) { window.open(url) })
When you have a Linkding page opened (e.g. viewing a "favourites" or a "daily" tag) clicking that Bookmark in your browser will open every link in a new tab.
Behavioral guidelines to reduce common LLM coding mistakes, derived from Andrej Karpathy's observations on LLM coding pitfalls.
These rules apply to every task in this project unless explicitly overridden. Tradeoff: These guidelines bias toward caution over speed. For trivial tasks, use judgment.
Don't assume. Don't hide confusion. Surface tradeoffs.
| #!/usr/bin/env python3 | |
| # Simple script to enter the necessary boot mode in the MT6572-based (etc) phones | |
| # Depends on pyserial, otherwise fully cross-platform | |
| # Usage: python3 mtk-bootseq.py [MODECMD] [port] | |
| # e.g. python3 mtk-bootseq.py FASTBOOT /dev/tty.usbmodem14200 | |
| # and then connect the cable and repeatedly short-press the power on key | |
| # Supported commands depend on the device and its preloader. Here's the list for Sigma S3500 sKai: |