Skip to content

Instantly share code, notes, and snippets.

@billythedummy
billythedummy / Dockerfile
Last active April 7, 2026 14:35
pi builder container
# Alpine-based image that can build (npm install && npm run build)
# the Pi coding agent monorepo (https://github.com/badlogic/pi-mono)
FROM node:22-alpine
RUN apk add --no-cache \
# All deps below required by node-canvas
python3 \
pkgconf \
pixman-dev \
@billythedummy
billythedummy / tg-fluux-agent-bridge.py
Last active April 5, 2026 03:11
slop script for bridging telegram bot to fluux agent over local ejabberd
'''
Clanker generated slop script for bridging from your telegram bot to a xmpp
fluux agent https://github.com/processone/fluux-agent
i.e.
Send: you -send-msg-> telegram server -tg-api-long-polling-> this program -xmpp-to-docker-host-ejabberd-> FLUUX_AGENT_JID
Receive: FLUUX_AGENT_JID -xmpp-to-docker-host-ejabberd-> this program -tg-api-> telegram server -send-msg-> you
Keeps typing... indicator on telegram from when msg was received from tg api to when its sent out to tg api
@billythedummy
billythedummy / float_to_atomics.py
Last active December 30, 2024 09:51
float_to_atomics.py
# float_to_atomics(39.8319163, 9) = '39831916300'
# Does not handle integers e.g. 5000
def float_to_atomics(n, atomics=9):
[w, d] = str(n).split(".")
if len(d) > atomics:
raise f"{n} atomics > {atomics}"
return "".join([w, d.ljust(atomics, '0')])
@billythedummy
billythedummy / base64_to_base58.py
Created November 29, 2024 08:57
base64_to_base58.py
import base58
import base64
B64 = "<BASE64-STRING-TO-CONVERT>"
base58.b58encode(base64.b64decode(B64))
@billythedummy
billythedummy / create-tokenkeg-mint-with-seed.py
Last active February 17, 2025 16:00
create-tokenkeg-mint-with-seed.py
'''
Tested with:
- solana==0.34.3
- solders==0.21.0
Pre-requisites:
- grind out desired pubkey with base set to BASE and owner set to tokenkeg program
using a tool like https://github.com/cavemanloverboy/vanity
- set PAYER const to path to signing keypair file
- set BASE const to path to signing keypair file that the pubkey is derived from
- set MINT to desired pubkey and SEED to found seed
@billythedummy
billythedummy / run-with-ts-node.ts
Last active March 9, 2026 10:21
solana realms.today (spl-governance) ts script to generate base64-encoded custom instruction
import { type TransactionInstruction } from "@solana/web3.js";
import { serializeInstructionToBase64 } from "@solana/spl-governance";
const IX: TransactionInstruction = ...; // TODO by user
console.log(serializeInstructionToBase64(IX));
@billythedummy
billythedummy / notes.md
Last active June 28, 2022 13:00
building solana tool suite for aarch64
@billythedummy
billythedummy / windows-git-bash-is-stupid.md
Last active March 12, 2025 19:30
Windows git bash is stupid

Problem

Assuming you've installed git with default settings on Windows 10, and you have your ssh keys in ~/.ssh (where ~ expands to something like C:/Users/user) as something like id_rsa and id_rsa.pub, you'll be unable to use the git bash to clone repos with git clone [email protected]:user/project.git. The git bash will always output some error log like

Cloning into 'project'...
\302\226\302\[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights