Skip to content

Instantly share code, notes, and snippets.

View SC4RECOIN's full-sized avatar
🦝

Kurtis Streutker SC4RECOIN

🦝
  • Toronto, ON
View GitHub Profile
@zhe-t
zhe-t / sendTxWithJito.ts
Last active March 1, 2025 15:19
Smart send a transaction using Jito dedicated endpoint
import { Connection, SendOptions } from '@solana/web3.js';
export type JitoRegion = 'mainnet' | 'amsterdam' | 'frankfurt' | 'ny' | 'tokyo';
export const JitoEndpoints = {
mainnet: 'https://mainnet.block-engine.jito.wtf/api/v1/transactions',
amsterdam: 'https://amsterdam.mainnet.block-engine.jito.wtf/api/v1/transactions',
frankfurt: 'https://frankfurt.mainnet.block-engine.jito.wtf/api/v1/transactions',
ny: 'https://ny.mainnet.block-engine.jito.wtf/api/v1/transactions',
tokyo: 'https://tokyo.mainnet.block-engine.jito.wtf/api/v1/transactions',
};
export function getJitoEndpoint(region: JitoRegion) {
@cobryan05
cobryan05 / fixNvPe.py
Last active July 29, 2024 02:04
Python Script to disable ASLR and make nv fatbins read-only to reduce memory commit
# Simple script to disable ASLR and make .nv_fatb sections read-only
# Requires: pefile ( python -m pip install pefile )
# Usage: fixNvPe.py --input path/to/*.dll
import argparse
import pefile
import glob
import os
import shutil
@hielfx
hielfx / sqldb.go
Last active April 10, 2025 23:03
Generic interface for using both sqlx.DB and sqlx.Tx independently. E.g. if you want to use a transaction or not but want the possibility to use both any time
package domain
import (
"context"
"database/sql"
"github.com/jmoiron/sqlx"
)
//SQLDB An interface to use for both sqlx.DB and sqlx.Tx (to use a transaction or not)