Skip to content

Instantly share code, notes, and snippets.

View jongan69's full-sized avatar
🎯
WEB3D

Jongan69 jongan69

🎯
WEB3D
View GitHub Profile
@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";
@jongan69
jongan69 / coin_data.py
Last active March 20, 2025 06:02
A bunch of python Solami code, not sure what I was doing
from solders.pubkey import Pubkey # type: ignore
from spl.token.instructions import get_associated_token_address
from construct import Padding, Struct, Int64ul, Flag
from walletTradingFunctions.config import client
from walletTradingFunctions.constants import PUMP_FUN_PROGRAM
# from config import client
# from constants import PUMP_FUN_PROGRAM
def get_virtual_reserves(bonding_curve: Pubkey):
bonding_curve_struct = Struct(
@jongan69
jongan69 / powerpoint.py
Created December 26, 2024 19:21
Turn all of your github repos from the past year into a powerpoint
import os
# Set tokenizers parallelism before importing transformers
os.environ["TOKENIZERS_PARALLELISM"] = "false"
import subprocess
import json
import random
import requests
from pptx import Presentation
from pptx.util import Pt, Inches
@jongan69
jongan69 / Cargo.toml
Last active March 5, 2025 03:49
Example Solana Rust Lottery Program
[package]
name = "lottery"
version = "0.1.0"
description = "Created with Anchor"
edition = "2021"
[lib]
crate-type = ["cdylib", "lib"]
name = "lottery"
@jongan69
jongan69 / scrape.py
Created December 17, 2024 08:35
scrape vydamo_.exe
import tweepy
import os
import json
import time
from dotenv import load_dotenv
from datetime import datetime, timedelta
# Load environment variables from .env
load_dotenv()
@jongan69
jongan69 / UnfollowInactiveTwitterUsers.js
Last active December 30, 2024 14:08
Open x.com/following and paste this in the console
(async function unfollowInactiveUsers() {
// Define a delay function with random variability
const delay = (min, max) => new Promise((resolve) => setTimeout(resolve, Math.random() * (max - min) + min));
// Function to click the "Unfollow" button within the confirmation popup
async function confirmUnfollow() {
try {
// Select the "Unfollow" button in the confirmation dialog
const confirmButton = document.querySelector('button[data-testid="confirmationSheetConfirm"]');
if (confirmButton) {
@jongan69
jongan69 / Main.py
Created July 27, 2024 16:17
This script reads the rsi of the lockin token from ox.fun using candles and then generates ai text and tweet based on the sentiment of the rsi and also places buy orders
import os
import schedule
import time
import tweepy
import textwrap
from dotenv import load_dotenv
from random import randint
from openai import OpenAI
import requests
@jongan69
jongan69 / .env
Last active October 30, 2024 01:07
Lockin Bot??? RSI??? someone plz shoot me
OX_API_KEY=
OX_API_SECRET=
import os
import schedule
import time
import tweepy
import textwrap
from dotenv import load_dotenv
from random import randint
from openai import OpenAI