Skip to content

Instantly share code, notes, and snippets.

@PaulRBerg
PaulRBerg / IdeaToken.sol
Created July 31, 2026 16:01
Ideamarket prototype contracts (2020) — recovered rDAI bonding-curve Solidity, never published; second-generation revision extracted from an archived Netlify frontend build
pragma solidity ^0.5.8;
//import "./IdeaTokenFactory.sol";
import "./openzeppelin/SafeMath.sol";
import "./openzeppelin/ERC20.sol";
import "./openzeppelin/ReentrancyGuard.sol";
import "./rtoken-contracts/IRToken.sol";
import "./IdeaTokenBondingCurve.sol";
contract IdeaToken is ReentrancyGuard, ERC20, IdeaTokenBondingCurve {
@PaulRBerg
PaulRBerg / next-server-sample.txt
Created January 14, 2026 12:04
next-server sample process on macOS (10GB)
Analysis of sampling node (pid 75010) every 1 millisecond
Process: node [75010]
Path: /Users/USER/Library/Application Support/fnm/*/node
Load Address: 0x1009dc000
Identifier: node
Version: 0
Code Type: ARM64
Platform: macOS
Parent Process: node [74971]
Target Type: live task
@PaulRBerg
PaulRBerg / effect-nextjs-architecture.md
Created November 26, 2025 08:36 — forked from kevin-courbet/effect-nextjs-architecture.md
Effect.ts + Next.js Full-Stack Architecture

Effect.ts + Next.js Full-Stack Architecture

A production-tested architecture for building type-safe Next.js applications with Effect.ts. Combines SSR, Server Actions, React Query, and layered dependency injection.

Overview

┌─────────────────────────────────────────────────────────────────────────┐
│                          CLIENT (React)                                 │
@PaulRBerg
PaulRBerg / subgraph.yaml
Created October 31, 2025 11:40
Sablier Lockup Graph manifest generated using commit hash d4eb56a (https://github.com/sablier-labs/indexers)
dataSources:
- context:
alias:
data: "LD"
type: "String"
chainId:
data: "1"
type: "BigInt"
version:
data: "v1.0"
#!/usr/bin/env python3
"""
Flatten @file references in Markdown documents.
See https://github.com/openai/agents.md/issues/11#issuecomment-3366858928
"""
from __future__ import annotations
import argparse
import sys
@PaulRBerg
PaulRBerg / foundry_copy_abi.sh
Created September 5, 2025 19:34
Shell function to copy an ABI from Foundry output directory
# Copy the ABI of a contract from the out directory to the clipboard
# Example: foundry_copy_abi SablierLockup out-optimized
function foundry_copy_abi() {
if [ -z "$1" ]; then
echo "Please provide a contract name"
echo "Usage: foundry_copy_abi <ContractName> [outDir]"
return 1
fi
local contract_name=$1
@PaulRBerg
PaulRBerg / update-changelog.md
Last active August 25, 2025 11:33
Claude Code command for updating a CHANGELOG.md file according to Common Changelog format

Update Changelog

Update the CHANGELOG.md file with all changes since the last version release.

Process

  1. Review git history - Examine commits since the last tagged release
  2. Follow format - Use Common Changelog specification
  3. Check version - Get current version from package.json
  4. Bump version - If unchanged since last release, increment per Semantic Versioning rules:
@PaulRBerg
PaulRBerg / cursor-rules.txt
Last active June 30, 2025 06:21
PRB's global cursor rules
You are a senior programmer with a preference for clean programming and design patterns.
- Be terse
- Suggest solutions that I didn't think about—anticipate my needs
- Treat me as an expert
- Be accurate and thorough
- Give the answer immediately. Provide detailed explanations and restate my query in your own words if necessary after giving the answer
- Consider new technologies and contrarian ideas, not just the conventional wisdom
- You may use high levels of speculation or prediction, just flag it for me
@PaulRBerg
PaulRBerg / setup-duti.sh
Last active March 13, 2026 03:27
Script to set Cursor as the default editor for all development file extensions on macOS using duti: https://github.com/moretension/duti/
#!/usr/bin/env zsh
# Set up the default application for file types.
# Strict mode: https://gist.github.com/vncsna/64825d5609c146e80de8b1fd623011ca
set -euo pipefail
# grab Cursor's bundle-ID
BUNDLE_ID=$(osascript -e 'id of app "Cursor"')
# Extensions in alphabetical order
@PaulRBerg
PaulRBerg / createNetworks.ts
Created May 14, 2025 18:29
Prototype of a script that generates the networks by using the `extractContract` function from The Graph manifest code
import { type Sablier, Version, getChainName, queries, releasesByProtocol } from "@sablier/deployments";
import supportedChains from "@src/chains";
import type { Config } from "@src/envio-config/types";
import { extractContract } from "@src/graph-manifest/sources/creators";
import { sanitizeName } from "@src/helpers";
import type { ContractMap, IndexedProtocol } from "@src/types";
import logger, { logAndThrow, thrower } from "@src/winston";
import _ from "lodash";
export function createNetworks2(