Skip to content

Instantly share code, notes, and snippets.

View heyJonBray's full-sized avatar
🗿

jonbray.eth heyJonBray

🗿
View GitHub Profile
@heyJonBray
heyJonBray / forge-script-helper.sh
Last active November 5, 2025 16:22
Interactive Forge Script Helper
#!/usr/bin/env bash
# Interactive helper script to run Forge scripts with environment-specific configuration.
#
# Author: Jon Bray <me@jonbray.dev>
#
# 1. Place script in the root of your Foundry project
# 2. Create a .env.<chain> file for any network you want to interact with
# - e.g. .env.local .env.ethereum .env.base .env.base_sepolia
# 3. Fill out env vars required by your scripts
#
@alex-miller-0
alex-miller-0 / eth-utxo.md
Last active February 3, 2024 15:20
UTXO tokens on Ethereum

Suppose we wish to model a UTXO system on the EVM. We need to represent UTXO tokens such that all value is preserved when tokens are spent. Note: For this example, we are not concerned about the security of the system and are satisfied with giving authorities the power to create tokens (e.g. as in a plasma system).

Consider the following object:

{
  owner: <address>,
  value: <uint>,
@dio
dio / hello-wasm.js
Last active September 10, 2023 07:42
This is a simpe example on embedding wasm inside an offline single html page
// this code is from a simple add function in c:
//
// // hello.c
// int add(int a, int b) {
// return a + b;
// }
//
// compiles it with emcc (http://webassembly.org/getting-started/developers-guide/)
// $ git clone https://github.com/juj/emsdk.git
@xero
xero / irc.md
Last active October 16, 2026 09:48
irc cheat sheet
@eyliu
eyliu / constitution.cls
Created August 11, 2009 20:05
LaTeX document class for typesetting a constitution
\NeedsTeXFormat{LaTeX2e}[1994/06/01]
\ProvidesClass{constitution}[2009/05/15 v0.0.1 Document class for typesetting a constitution]
\LoadClass{report}
\RequirePackage[letterpaper,margin=1in]{geometry}
\RequirePackage[colorlinks,linkcolor=blue]{hyperref}
%\usepackage{hyperref}
\RequirePackage{titlesec}