Skip to content

Instantly share code, notes, and snippets.

You are the orchestrator.
You think, design and plan architectural decision only. Write only essential technical specs and reasoning. Prefer not to write code yourself unless all executors fail.
Never assume the user's intent. Ask for clarification for ambiguous situations.
Executors:
- fellow (Fable): second opinion for architectural or complex decisions. For hardest problem only.
- mechanical (Sonnet): mechanical for fast/small redundant tasks.
- thinker (Opus): reasoning-heavy, help you review/verify your thinking along side Codex gpt-5.6-sol below.
@franky47
franky47 / loadEnv.ts
Created January 6, 2026 18:47
loadEnv
import { loadEnvFile } from 'node:process'
export function loadEnv() {
const nodeEnv = process.env.NODE_ENV || 'development'
// Load in order of precedence
const files = [
`.env.${nodeEnv}.local`,
nodeEnv === 'test' ? null : `.env.local`,
`.env.${nodeEnv}`,
`.env`,
@o-az
o-az / watch-and-kill-ports.sh
Created January 3, 2026 15:30
a SwiftBar-based macOS menu-bar app that displays open ports and lets you kill them
#!/usr/bin/env bash
# SwiftBar plugin: Open Listening Ports Monitor
# Displays open TCP listening ports and lets you kill your own processes
current_user=$(whoami)
# Get listening ports with numeric values only
open_ports=$(lsof -iTCP -sTCP:LISTEN -n -P 2>/dev/null | awk -v cu="$current_user" 'NR > 1 {
user = $3
@hackermondev
hackermondev / writeup.md
Last active May 8, 2026 15:19
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)

Vyper Bytecode Analysed

Bytecode structure

Smart contracts have two bytecodes: creation_bytecode and runtime_bytecode:

  • the creation_bytecode is the one included in the transaction that deploys the contract.
  • the runtime_bytecode is the one stored at the address of the contract, fetchable by calling the eth_getCode RCP method.

:::info This section is referring to Vyper contracts with version >=0.4.1, below you can find a separate section containing differences for older Vyper versions.

// Triggered by: https://fediverse.zachleat.com/@zachleat/115300801628689509
// Interesting inconsistency...
// The reason is probably backward compatibility:
// Truthiness checks are often used to answer the question “Is this value an object?”
class MyBool {
#bool;
constructor(bool) {
this.#bool = bool;
}
@subframe7536
subframe7536 / cc_manager.py
Last active August 30, 2025 18:21
Claude Code Env Manager
#!/usr/bin/env python3
"""
Claude Configuration Manager - Simplified and Optimized
Manages API configurations for Claude with multiple presets support.
"""
import argparse
import json
import os
import sys
@productdevbook
productdevbook / drizzle-orm.md
Last active June 3, 2026 15:03
Drizzle ORM PostgreSQL Best Practices Guide (2025)

Drizzle ORM PostgreSQL Best Practices Guide (2025)

Latest Drizzle ORM features and optimal schema patterns

Major 2025 Update: PostgreSQL now recommends identity columns over serial types. Drizzle has fully embraced this change.

import { pgTable, integer, text, timestamp, varchar } from 'drizzle-orm/pg-core';
@NotWadeGrimridge
NotWadeGrimridge / xpost.py
Last active July 27, 2026 01:17
Tweet from your terminal
#!/usr/bin/env -S uv --quiet run --script
# /// script
# requires-python = ">=3.13"
# dependencies = [
# "beautifulsoup4",
# "curl-cffi",
# "pycryptodome",
# "xclienttransaction",
# ]
# ///
@darkobits
darkobits / start-adapter.ts
Last active January 28, 2026 05:59
WebSocket Adapter for TanStack Start
import { json } from '@tanstack/react-start'
import { getEvent, type ServerRouteMethodsRecord } from '@tanstack/react-start/server'
import createNodeAdapter, { type NodeOptions as NodeAdapterOptions } from 'crossws/adapters/node'
/**
* Adapter for TanStack Start and `crossws`.
*
* @see https://tanstack.com/start/latest/docs/framework/react/server-routes
* @see https://nitro.build/guide/websocket
*