- Extract the main NSO
- Convert it into an ELF (to strip header/hashes)
- Load it into Ida, find the function and patch the bytes back into the binary
- Convert the ELF back into NSO
- Use the nso as exefs patch or re-import it into the NCA/NSP
Discover gists
| # Sets CORS headers for request from example1.com and example2.com pages | |
| # for both SSL and non-SSL | |
| SetEnvIf Origin "^https?://[^/]*(example1|example2)\.com$" ORIGIN=$0 | |
| Header set Access-Control-Allow-Origin %{ORIGIN}e env=ORIGIN | |
| Header set Access-Control-Allow-Credentials "true" env=ORIGIN | |
| # Always set Vary: Origin when it's possible you may send CORS headers | |
| Header merge Vary Origin |
| In this post, .net platform has this pinvoke mechanism where it is allowed that you call into the Native windows . | |
| this is extremely useful when you have some 3rd party libraries or if you try to program against with the low-level windows APIS. | |
| One of the typic application htat utilize the Lowe-level windows apis are those Native win32 applications. Where you creat a message pump with the necessary WNDCLASSEX to represent/register the window message pump and message handler process. What you will deal with the win32 applications include the following. | |
| RegisterClassEx, CreateWindowEx, GetMessage(), TranslateMesage(), and DispatchMessage(...). | |
| to be able to use the Window API, you have to declare tons of Structure and PInvoke Method, while you can find help from the Pinvoke.Net. | |
| First, we will introduce some of the win32/user32 functions and their relative structure definitions. |
WhatsApp for macOS repeatedly writes new UUID-named copies of the same MP4, Opus audio file, and thumbnail into ~/Library/Group Containers/group.net.whatsapp.WhatsApp.shared/Message/Media/<chat-lid>/. The database continues to reference only one current triplet, so previous triplets become orphaned and are not shown by WhatsApp's Manage Storage screen.
The same failure signature was independently verified on two physical Apple Silicon Macs with different hardware identifiers and macOS builds. Machine 1 accumulated approximately 33 GiB and 20,703 orphaned files in one chat directory. Machine 2 accumulated 17.25 GiB and 10,767 orphaned files in its corresponding directory. Across both machines, the physical files used the same three exact sizes and SHA-256 hashes, while each database referenced only one MP4, one Opus file, and one thumbnail.
On Machine 1, the 20,703 unreferenced duplicates were removed while WhatsApp was stopped, preserving the three database-referenced files. WhatsApp was then updated from
| name: Security audit | |
| on: | |
| schedule: | |
| - cron: '0 0 * * *' | |
| push: | |
| paths: | |
| - '**/Cargo.toml' | |
| - '**/Cargo.lock' | |
| jobs: | |
| security_audit: |
This gist refers to ESP-IDF v5.5.2 - the current stable version as of Dec '25, paths will obviously change slightly in future versions.
The debugging toolchain works as follows:
- zed talks to gdb via it's Debug Adapter Protocol (dap) interface. This is configured in .zed/debug.json residing in your project directory. It's crucial to use a version of gdb built with the python extension in order for the dap interface to work - more on this later.
- gdb talks to openocd via it's built-in gdb server's tcp port (usually 3333).
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.
