Skip to content

Instantly share code, notes, and snippets.

View bthaile's full-sized avatar

Tom Haile bthaile

  • code slinger
View GitHub Profile
//@version=6
strategy("30min ORB + OR Box + Gap Filter [v6]", overlay=true,
default_qty_type=strategy.percent_of_equity,
default_qty_value=100,
commission_type=strategy.commission.percent,
commission_value=0.1)
// ── Inputs ─────────────────────────────────────────────────────────────────────
orbMinutes = input.int(30, "Opening Range Minutes", minval=5, maxval=60)
gapMovePct = input.float(5.0, "Gap Threshold %", minval=0.1)
@bthaile
bthaile / nft_collection.json
Last active February 20, 2025 20:44
nft_collection.json
{
"name": "My NFT Collection",
"description": "A collection of beautiful landscape NFTs",
"image": "https://images.unsplash.com/photo-1506744038136-46273834b3fb?w=1200",
"external_link": "https://images.unsplash.com/photo-1506744038136-46273834b3fb?w=1200",
"seller_fee_basis_points": 0
}
@bthaile
bthaile / nft.json
Last active February 20, 2025 22:27
{
"name": "Free Image NFT",
"description": "This is NFT featuring a free image",
"image": "https://images.unsplash.com/photo-1506744038136-46273834b3fb?w=1200",
"external_url": "https://images.unsplash.com/photo-1506744038136-46273834b3fb?w=1200",
"background_color": "white"
}
@bthaile
bthaile / mainnet.layerzero.config.ts
Last active January 8, 2025 01:41
mainnet.layerzero.config.ts
import { MainnetV2EndpointId } from '@layerzerolabs/lz-definitions'
import layerZero from './config/layerzero.json'
import type { OAppOmniGraphHardhat, OmniPointHardhat } from '@layerzerolabs/toolbox-hardhat'
const flowMainnet = layerZero['Flow-Mainnet']
const ethereumMainnet = layerZero['Ethereum-Mainnet']
const EthMainnetContract: OmniPointHardhat = {
@bthaile
bthaile / GetGreeting.ts
Created February 23, 2024 21:24
GetGreeting
// Import ethers from the ethers.js library
const { ethers } = require('ethers');
// Define the contract ABI
const contractABI = [
"function hello() public view returns (string memory)"
];
// Define the contract address
const contractAddress = "0x3e6559ef912754b7cb75eaf7f265bdedebb6a437";
@bthaile
bthaile / HelloWorld.sol
Created February 23, 2024 21:24
HelloWorld.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
contract HelloWorld {
// Declare a public field of type string.
string public greeting;
// Constructor to initialize the greeting.
// In Solidity, the constructor is defined with the "constructor" keyword.
constructor() {
@bthaile
bthaile / portfolio.md
Created January 23, 2024 03:42
$25,000 portfolio

Design a trading plan for a $25,000 account Goal: Grow account to $75,000 to pay off forever-home to get ready for retirement. Grow by 10% to meet the target retirement time frame of 11.5 years. Trading Plan: Earnings in S&P 500 companies to achieve 4% annualized profit (need to test to get a more realistic goal). Trade Covered Strangle and Ratio Diagonals to achieve 6% profit, utilize Box Spreads to capture risk free rate and cover any downsides in options strategies. Risk Mgmt: Exit uncapped risk positions at 15% drawdowns, flatten capped risk positions at 50% loss. Tracking: Spreadsheet, track overall portfolio utilization, positional risk, ROIC (measure efficiency), CAGR (measure on portfolio track). With a small account need to stay efficient with collecting premium, Target 20% APR, higher APR target to increase efficiency and counter cap lock up in underlying.

Trading Earnings: Entry Criteria: S&P 500 companies with high probability of actual move less than implied move. Te

@bthaile
bthaile / UpdateHelloWorld.template.json
Created November 7, 2023 20:57
UpdateHelloWorld.template.json
{
"f_type": "InteractionTemplate",
"f_version": "1.0.0",
"id": "bfbd8abc17b30b582427b39097b33e9fc34f425871eb065e6c1cfcccfafe4470",
"data": {
"type": "transaction",
"interface": "",
"messages": {
"title": {
"i18n": {
@bthaile
bthaile / ReadGreeting.template.json
Created November 7, 2023 20:43
ReadGreeting.template.json
{
"f_type": "InteractionTemplate",
"f_version": "1.0.0",
"id": "ba1fdd454259db9920a8d067e3c22135155365f507ed8b2c4fcf6cbdc4fddbd5",
"data": {
"type": "script",
"interface": "",
"messages": {
"title": {
"i18n": {
pragma solidity ^0.8.0;
// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.
/**
* @dev Wrappers over Solidity's arithmetic operations.
*
* NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler