Skip to content

Instantly share code, notes, and snippets.

View tzhenghao's full-sized avatar
🏎️

Zheng Hao Tan tzhenghao

🏎️
View GitHub Profile
@tzhenghao
tzhenghao / singapore-airlines-scam-counter-logic.js
Created March 17, 2019 18:54
Singapore Airlines scam counter logic
var zeit = new Date();
var sec = zeit.getSeconds();
if (sec < 6 ){
sec = 9
}
if (sec > 5 & sec < 13 ){
sec = 8
@tzhenghao
tzhenghao / singapore-airlines-scam-typo.js
Created March 17, 2019 19:07
Singapore Airlines scam typo
if (wochentag==3) document.write("Wednesday");
if (wochentag==4) document.write("Thrusday");
if (wochentag==5) document.write("Friday");
@tzhenghao
tzhenghao / create_stake_account.py
Created June 2, 2021 07:33
A Python script that creates a SOL stake account and delegates it to a given validator
"""A Python script that creates a SOL stake account and delegates it to a given validator"""
import subprocess
LEDGER_PRIVATE_ADDR = "usb://ledger"
def main():
stake_account_json_file = input(
"Please enter the name for this new stake account: "
)
@tzhenghao
tzhenghao / query_stake_account_balances.py
Created June 2, 2021 07:35
A Python script to query stake account balances
"""A Python script to query stake account balances"""
import json
import requests
import subprocess
STAKE_ACCOUNT_ADDRESSES = [
"<ADD_ALL_ADDRESSES_HERE>"
]