Skip to content

Instantly share code, notes, and snippets.

View jongan69's full-sized avatar
🎯
WEB3D

Jongan69 jongan69

🎯
WEB3D
View GitHub Profile
@jongan69
jongan69 / package.json
Last active July 4, 2025 15:24
my expo router package.json scripts
"scripts": {
"start": "expo start",
"lint": "eslint . --ext .js,.jsx,.ts,.tsx",
"android": "expo run:android",
"ios": "expo run:ios",
"android:dev": "expo run:android --device",
"ios:dev": "expo run:ios --device",
"web": "expo start --web",
"deploy": "npx expo export -p web && npx eas-cli@latest deploy",
"tunnel": "npx expo start --tunnel -c",
@jongan69
jongan69 / sad_maxxing.py
Created June 24, 2025 04:00
Damn you Google, damn you
from fastapi import FastAPI, HTTPException
from pydantic import BaseModel, Field
from typing import List, Optional, Dict, Any
from fast_hotels import HotelData, Guests, get_hotels
from fast_flights import FlightData, Passengers, get_flights
import logging
import re
import pandas as pd
# Helper functions for parsing price and stops
@jongan69
jongan69 / main.py
Created June 8, 2025 19:27
goose + parser api
from fastapi import FastAPI, UploadFile, File, HTTPException
from fastapi.middleware.cors import CORSMiddleware
from fastapi.responses import JSONResponse
from pydantic import BaseModel
from typing import Dict, Any, Optional, List
import subprocess
import re
import os
import json
import logging
@jongan69
jongan69 / main.py
Created June 8, 2025 16:30
Latest Goose API
from fastapi import FastAPI, HTTPException
from fastapi.middleware.cors import CORSMiddleware
from pydantic import BaseModel
import subprocess
import re
import os
# Clean the output of the goose command
def clean_goose_output(output: str) -> str:
@jongan69
jongan69 / main.py
Created June 8, 2025 08:48
goose api wrapper
from fastapi import FastAPI, HTTPException
from pydantic import BaseModel
import subprocess
app = FastAPI()
class GooseInput(BaseModel):
instructions: str
session_name: str = "api-session"
@jongan69
jongan69 / Send_Text.py
Created May 11, 2025 19:08
Using Surge API for sending text messages in python
import requests
import json
import os
import dotenv
dotenv.load_dotenv()
# Surge API endpoint
url = "https://api.surge.app/messages"
@jongan69
jongan69 / alpaca_portfolio.py
Created May 10, 2025 23:24
Script for running portfolio metrics on alpaca portfolio
import os
import sys
import logging
from datetime import datetime, timedelta
import requests
from dotenv import load_dotenv
import yfinance as yf
from collections import Counter, defaultdict
import re
from alpaca.trading.client import TradingClient
@jongan69
jongan69 / fidelity_portfolio_analysis.py
Created May 10, 2025 23:10
A Script for running portfolio metrics against a fidelity brokerage account, uses FIDELITY_USERNAME, FIDELITY_PASSWORD, and FIDELITY_ACCOUNT_NUMBER to retrieve ofx data and parses it
import os
import datetime
import codecs
import re
from decimal import Decimal
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import yfinance as yf
from ofxtools.Client import OFXClient, InvStmtRq
@jongan69
jongan69 / alpaca_transfer.py
Created April 18, 2025 09:11
Automate Deposit and Withdrawals into alpaca account
import asyncio
import os
import requests
from dotenv import load_dotenv
load_dotenv(override=True)
async def transfer_to_alpaca(amount, direction):
try:
direction = "INCOMING" if direction == "IN" else "OUTGOING"
@jongan69
jongan69 / tokenUtilsUpdated.ts
Created January 20, 2025 20:52
Using Metaplex UMI for token data, reference lockin repo tokenUtils to see original
import { AddressLookupTableAccount, Connection, PublicKey, PublicKeyInitData, TransactionInstruction } from "@solana/web3.js";
// import { Metaplex } from "@metaplex-foundation/js";
import Bottleneck from "bottleneck";
import {
fetchDigitalAssetWithAssociatedToken,
mplTokenMetadata,
findMetadataPda} from '@metaplex-foundation/mpl-token-metadata'
import { fromWeb3JsPublicKey, toWeb3JsPublicKey } from '@metaplex-foundation/umi-web3js-adapters'
import { createUmi } from '@metaplex-foundation/umi-bundle-defaults'
import { fetchIpfsMetadata } from "./fetchIpfsMetadata";