Skip to content

Instantly share code, notes, and snippets.

@kaiuwepeter
kaiuwepeter / git-apply-patch.md
Created December 19, 2025 10:27 — forked from emmanueltissera/git-apply-patch.md
Generate a git patch for a specific commit

Creating the patch

git format-patch -1 <sha>
OR
git format-patch -1 HEAD

Applying the patch

git apply --stat file.patch # show stats.
git apply --check file.patch # check for error before applying

@mattppal
mattppal / nano-banana.py
Created August 27, 2025 16:15
Nano banana variations script
# /// script
# dependencies = [
# "google-genai",
# "pillow",
# "pathlib",
# "python-dotenv",
# ]
# ///
# Description: Generate variations of a person image using Google Gemini AI and create a GIF
# 松山観光
- 広島港~松山観光港
- スーパージェット(水中翼船)
- 高くて早い
- https://setonaikaikisen.co.jp/kouro/superjet/
- フェリー
- 安くてゆっくり
- https://setonaikaikisen.co.jp/kouro/cruise/
- 広島を出て呉の手前で、音戸の瀬戸(おんどのせと)という狭い海峡を通る
import math
def dist(p1, p2):
x1, y1, x2, y2 = *p1, *p2
return math.sqrt((y2-y1)**2 + (x2-x1)**2)
def polar_angle(p1, p2):
if p1[1] == p2[1]:
return -math.pi
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active December 19, 2025 10:25
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This does not works in browser for quests which require you to play a game! Use the desktop app to complete those.

How to use this script:

  1. Accept a quest under Discover -> Quests
  2. Press Ctrl+Shift+I to open DevTools
  3. Go to the Console tab
  4. Paste the following code and hit enter:
@pissang
pissang / echarts-svg.js
Last active December 19, 2025 10:19
Server side SVG rendering of ECharts
const echarts = require("echarts");
const Canvas = require('canvas');
const {JSDOM} = require('jsdom');
const fs = require('fs');
echarts.setCanvasCreator(() => {
return new Canvas(100, 100);
});
const {window} = new JSDOM();
global.window = window;
@ahmednawazkhan
ahmednawazkhan / installing-cpp-on-windows.md
Last active December 19, 2025 10:18
Install C++/Mingw-w64/g++ on windows

Installing C++/g++/Mingw-w64 on Windows

  1. Install Msys2 from msys2.org
  2. Complete the steps and open Msys2
  3. Update package databases pacman -Syu
  4. Update rest of base packages pacman -Su
  5. Install Mingw-w64 pacman -S --needed base-devel mingw-w64-x86_64-toolchain
  6. Install CMake pacman -S mingw-w64-x86_64-cmake
  7. Install Ninja pacman -S mingw-w64-x86_64-ninja
  8. Make sure to launch MSYS2 MinGW 64-bit with administrator rights ( This is !mportant...!!!)
@suica
suica / Brewfile
Last active December 19, 2025 10:13
MacOS Development Setup
### generated by "brew bundle dump --describe"
tap "homebrew/bundle"
# Resource monitor. C++ version and continuation of bashtop and bpytop
brew "btop"
# Diff that understands syntax
brew "difftastic"
# Modern replacement for 'ls'
brew "eza"
# Command-line fuzzy finder written in Go
@hackermondev
hackermondev / writeup.md
Last active December 19, 2025 10:12
How we pwned X (Twitter), Vercel, Cursor, Discord, and hundreds of companies through a supply-chain attack

hi, i'm daniel. i'm a 16-year-old high school senior. in my free time, i hack billion dollar companies and build cool stuff.

about a month ago, a couple of friends and I found serious critical vulnerabilities on Mintlify, an AI documentation platform used by some of the top companies in the world.

i found a critical cross-site scripting vulnerability that, if abused, would let an attacker to inject malicious scripts into the documentation of numerous companies and steal credentials from users with a single link open.

(go read my friends' writeups (after this one))
how to hack discord, vercel, and more with one easy trick (eva)
Redacted by Counsel: A supply chain postmortem (MDL)