Skip to content

Instantly share code, notes, and snippets.

@Slluxx
Slluxx / patchNXapps.md
Last active October 5, 2026 06:53
How to patch Nintendo Switch Applications in IDA

Patching the Youtube App

In short

  1. Extract the main NSO
  2. Convert it into an ELF (to strip header/hashes)
  3. Load it into Ida, find the function and patch the bytes back into the binary
  4. Convert the ELF back into NSO
  5. Use the nso as exefs patch or re-import it into the NCA/NSP
@brianlmoon
brianlmoon / apache_cors_example
Last active October 5, 2026 06:49
CORS example for Apache with multiple domains
# 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
@AlexanderBaggett
AlexanderBaggett / gist:d1504da93727a1778e8b5b3453946fc1
Last active October 5, 2026 06:45
Full win32 window from C# with Pinvoke
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.
@Enrico2
Enrico2 / WhatsApp-macOS-orphan-media-disk-leak-report.md
Created August 27, 2026 17:35
WhatsApp for macOS creates unbounded orphaned media duplicates — independently verified on two Macs

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

@LukeMathWalker
LukeMathWalker / audit.yml
Last active October 5, 2026 06:41
GitHub Actions - Rust setup
name: Security audit
on:
schedule:
- cron: '0 0 * * *'
push:
paths:
- '**/Cargo.toml'
- '**/Cargo.lock'
jobs:
security_audit:
@jonlidgard
jonlidgard / zed_esp32_debugging.md
Last active October 5, 2026 06:33
Debugging ESP-IDF using the Zed Editor on a Mac

Zed Editor set-up to do ESP32 Embedded Debugging with the ESP-IDF Framework (macOS).

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).

LLM Wiki

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.

The core idea

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.

@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active October 5, 2026 06:17
Complete Recent Discord Quest

Caution

As of August 26th 2026, Discord has started suspending quest access of people caught automating quest completion.

Some users have received the following system message:

image

There isn't much I can do to make the script undetected, so use it at your own risk, as you WILL get flagged by doing so.

Complete Recent Discord Quest

@ghuntley
ghuntley / jiti-kernel-diagram.md
Last active October 5, 2026 06:15
JITI kernel, OpenAI generations, and recovery ASCII diagrams

JITI: a CS50-style tour of a repairable Lisp kernel

The project keeps a running Lisp world alive while an outside controller asks an OpenAI model what to try next.

1. The big picture

                         "What should we try?"
                                  |
 v