Skip to content

Instantly share code, notes, and snippets.

@ezynda3
ezynda3 / mongodb-tests.ts
Created October 22, 2025 10:45
Mongo DB TS Helpers
import { config } from 'dotenv'
import { MongoClient } from 'mongodb'
import { consola } from 'consola'
import { type Address, type Hex } from 'viem'
import { getRPCEnvVarName } from '../script/utils/network.js'
import {
type ISafeTxDocument,
type ISafeTransaction,
OperationTypeEnum,
storeTransactionInMongoDB,
@ezynda3
ezynda3 / test-mongo-helper-functions.sh
Created October 22, 2025 10:42
Test Mongo DB Bash Helpers
#!/bin/bash
PROJECT_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
cd "$PROJECT_ROOT"
source .env
source script/helperFunctions.sh
export ENABLE_MONGODB_LOGGING="true"
@ezynda3
ezynda3 / parser.go
Last active September 16, 2025 18:17
JSON to BAML TypeBuilder Parser
package parser
import (
"fmt"
"strings"
"example.com/baml_client/type_builder"
baml "github.com/boundaryml/baml/engine/language_client_go/pkg"
)
@ezynda3
ezynda3 / fetch_pr_comments.sh
Last active August 19, 2025 04:35
Fetch all comments from pr and user
#!/bin/bash
# Script to fetch and display PR comments from GitHub
# Automatically detects repository from current git directory
# Usage: ./fetch_pr_comments.sh <PR_NUMBER> [USERNAME]
# Color codes for better output
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
@ezynda3
ezynda3 / bigmi-transaction-creation.md
Created July 27, 2025 13:32
Creating Bitcoin Transactions with Bigmi and bitcoinjs-lib

Creating Bitcoin Transactions with Bigmi and bitcoinjs-lib

The bigmi library doesn't include functions for generating raw transactions. It focuses on blockchain data retrieval and transaction broadcasting. For transaction creation, use bitcoinjs-lib which bigmi already depends on.

Recommended Approach: Using bitcoinjs-lib

1. Basic Transaction Creation

import * as bitcoin from 'bitcoinjs-lib';
import { getUTXOs } from '@bigmi/core';
@ezynda3
ezynda3 / bigmi-docs.md
Created July 27, 2025 13:23
Bigmi Library - Complete Function Documentation

Bigmi Library - Complete Function Documentation

Overview

Bigmi is a TypeScript library for Bitcoin applications that provides a comprehensive set of functions for interacting with the Bitcoin blockchain. It includes actions for querying blockchain data, managing transactions, and working with various Bitcoin data providers.

Core Functions

1. getBalance

@ezynda3
ezynda3 / crawl4ai-openapi.yml
Created January 23, 2025 10:46
Crawl4AI OpenAPI Spec
openapi: 3.0.3
info:
title: Crawl4AI API
version: 1.0.0
description: API for web crawling and content extraction
servers:
- url: /
components:
@ezynda3
ezynda3 / main.go
Created December 23, 2024 14:05
Livekit Real-time audio echo back
package main
import (
"context"
"encoding/json"
"fmt"
"io"
"log"
"net/http"
"os"
@ezynda3
ezynda3 / ConnectFour.sol
Created November 27, 2022 14:08
Connect Four Solidity
// SPDX-License-Identifier: MIT
//
// Let's play connect-four!
// Check out the contract for details.
pragma solidity 0.8.17;
contract ConnectFour {
mapping(bytes32 => Game) public games; // Game IDs ==> Games
mapping(address => uint256) public nrOfGames; // User ==> Nr. of Games
@ezynda3
ezynda3 / rescue-tokens.ts
Created July 18, 2022 08:08
Flashbots Rescue Tokens
import { ethers, providers, Wallet, utils, Transaction } from "ethers";
import {
FlashbotsBundleProvider,
FlashbotsBundleResolution,
} from "@flashbots/ethers-provider-bundle";
import { exit } from "process";
const FLASHBOTS_URL = "https://relay-goerli.flashbots.net";
const TOKEN_ADDRESS = "0x4E5d67a73bdb6BF68fADa7BDD7F455A7aA02C8ab";