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
#
@heyJonBray
heyJonBray / settings.json
Last active July 8, 2025 23:17
vscode/cursor settings.json
{
// ========== GENERAL ========== //
"editor.fontFamily": "BlexMono Nerd Font, CommitMono Nerd Font, JetBrains Mono, Fira Code",
// other fonts: CommitMono Nerd Font, Iosevka Nerd Font
"editor.fontSize": 16,
"editor.lineHeight": 1.5,
"editor.tabSize": 2,
"editor.fontLigatures": false,
"editor.cursorStyle": "line",
"editor.cursorSmoothCaretAnimation": "on",

Stateless and Cross-Chain Web3 App Design

This architecture demonstrates patterns and best-practices for building stateless, client-side applications that derive all state from onchain events without requiring traditional databases or user account systems.

Since we're directly consuming onchain data we have automatic synchronization with the current chain state. By leveraging subgraph data along with client-side processing, we can:

  • Infer relationships from on-chain activity (e.g., multiple accounts managed by a single wallet)
  • Derive the full onchain state from raw events (e.g., transaction status, account balances)
  • Scale horizontally without additional backend infra
  • Maintain a single onchain source of truth
@heyJonBray
heyJonBray / npm_publish_tool.md
Last active July 27, 2025 20:37
interactive npm bump/publish shell script

npm bump + publish helper

an interactive shell script for bumping npm package versions.

features

  • prompts for version bump (major/minor/patch)
  • detects and optionally runs lint, test, build, prepublish, and prepare scripts
  • checks for unstaged git changes and warns the user
  • supports --dry-run mode
@heyJonBray
heyJonBray / solidity-foundry-rules.md
Created April 3, 2025 03:37
Solidity Foundry Agent Rules

You are an expert in Solidity and smart contract security.

General Rules

  • Cut the fluff. Code or detailed explanations only.
  • Keep it casual and brief.
  • Accuracy and depth matter.
  • Answer first, explain later if needed.
  • Logic trumps authority. Don't care about sources.
  • Embrace new tech and unconventional ideas.

Xeon Protocol Bug Bounties

xeon token

The v1-core repository is subject to the Xeon Protocol Bug Bounty (the "Program") to incentivize responsible disclosure of vulnerabilities. We are offering XEON token rewards for submissions that meet eligibility criteria.

Scope

The scope of the Program is limited to bugs that result in the direct loss of user or protocol funds when interacting with Xeon v1 contracts, and bugs that interfere with the ability of peripheral contracts to properly interact with core contracts.

@heyJonBray
heyJonBray / VST-Trading-Strategy.md
Last active January 28, 2023 02:31
A day-trading strategy utilizing minimum reliable and tested indicators with built in risk management.

VST Day-Trading Strategy

Jon Bray

Strategy Created: 12-Sep, 2020 Current Revision: 25-Jan, 2023

This strategy is most accurate for day trading using chart intervals less than 30 min. Most notably 1m, 2m, 15m although by more carefully monitoring stop-loss (SL) and take-profit (TP), it can be applied to position trading using 1H and 4H chart intervals as well. This strategy is most effective when the current volume is at or above the daily average.

This strategy works well for the following asset classes: Crypto, Stocks, Commodities, Indexes

@heyJonBray
heyJonBray / WSI_GMM.groovy
Created December 5, 2022 18:05
Real-time watershed segmentation and morphological detection of stained pathology slides - Plugin for QuPath
/**
@version: 06.14.19
@author: Jon Bray
@author: jon@heyjonbray.com
*/
import qupath.lib.scripting.QPEx;
import qupath.lib.regions.RegionRequest;
import java.awt.image.BufferedImage;
import qupath.lib.objects.PathObject;
import javax.imageio.ImageIO;
@heyJonBray
heyJonBray / RGB2CMYK.java
Created December 5, 2022 17:48
RGB to CMYK Image Converter for ImageJ
import ij.*;
import ij.process.*;
import ij.plugin.PlugIn;
/**
This plugin is a Java implementation of the script defined by:
Stephan Saalfeld | http://pacific.mpi-cbg.de/wiki/index.php/RGB_to_CMYK
This converts an uncalibrated linear RGB image into an uncalibrated linear 32-bit CMYK stack.
*/
@heyJonBray
heyJonBray / keybase.md
Created September 30, 2021 12:23
Keybase verification

Keybase proof

I hereby claim:

  • I am heyjonbray on github.
  • I am heyjonbray (https://keybase.io/heyjonbray) on keybase.
  • I have a public key whose fingerprint is 7D7B 2F2B C44E 4213 FE17 4DB2 7D50 708D 4815 FDDC

To claim this, I am signing this object: