Skip to content

Instantly share code, notes, and snippets.

View zquestz's full-sized avatar

Josh Ellithorpe zquestz

View GitHub Profile
@zquestz
zquestz / KubernetesBitcoinConfigs.md
Last active May 20, 2022 02:42
GCE Kubernetes Bitcoin Configs

Bitcoin Kubernetes Configs

The following guide will walk you through creating a bitcoin full node within GKE (Google Container Engine).

By default Bitcoin ABC is used, however this can be swapped for any other node quite easily.

If you wish to run another version of bitcoind, just change the image reference in bitcoin-deployment.yml. There are tons of images available on the Docker Hub. Better yet, build your own. =)

The source for the included image is available at: https://github.com/zquestz/docker-bitcoin

const TOKEN_CONTRACT_ADDRESS="0xc70c7718C7f1CCd906534C2c4a76914173EC2c44"
const YOUR_ETH_ADDRESS="0x6cdde7dd0acc56cabfc2315791016f7c334d72c3"
// The minimum ABI to get SEP20 Token balance
const minABI = [
{
constant: true,
inputs: [{ name: "_owner", type: "address" }],
name: "balanceOf",
outputs: [{ name: "balance", type: "uint256" }],
@zquestz
zquestz / trace.txt
Created May 1, 2021 03:41
smartBCH stack trace
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x48 pc=0xd98f34]
goroutine 1 [running]:
github.com/smartbch/smartbch/staking.DistributeFee(0x747af, 0xc00062bda0, 0x1607ac8, 0xc000228000, 0xc0001b9310, 0x0, 0x0, 0x0, 0x0, 0xc00010f6e0, ...)
/smart_bch/smartbch/staking/staking.go:382 +0x3d4
github.com/smartbch/smartbch/app.(*App).Commit(0xc000d28000, 0xc000cd6a60, 0xc00010f6c0, 0xc0001b96c8, 0xddaa85)
/smart_bch/smartbch/app/app.go:517 +0xa99
github.com/tendermint/tendermint/abci/client.(*localClient).CommitSync(0xc005703320, 0x0, 0x0, 0x0)
/go/pkg/mod/github.com/tendermint/tendermint@v0.34.10/abci/client/local_client.go:258 +0xab
@zquestz
zquestz / avocado.json
Created August 5, 2020 17:02
Avocado!
{
"request_id": "5925a471-93b5-42d2-b20a-93615fa6ddb6",
"user_id": 1,
"urls": [
"https://pbs.twimg.com/media/EeqtuGzU4AAQDRF\\?format\\=jpg"
],
"features": [],
"backends": [],
"tag_score": 0.8,
"capture_interval": 0,
{
"request_id": "eafa52f0-aa3d-4637-9155-452a9880f498",
"user_id": 1,
"urls": [
"https://visionati.com/_assets/img/home-hero-wide.jpg"
],
"features": [],
"backends": [],
"tag_score": 0.8,
"capture_interval": 0,
@zquestz
zquestz / .profile
Created May 12, 2019 03:10
.profile
# Setup Go.
export GOPATH=~/go
export GOBIN=~/go/bin
# Include key binary paths.
export PATH=~/go/bin:$PATH:$HOME/.rvm/bin
# Enable QT package config.
export QT_PKG_CONFIG=true
@zquestz
zquestz / thread_pool.rb
Last active May 12, 2019 03:08
threadpool
require 'thread'
class ThreadPool
attr_reader :queue, :threads
def initialize(size = 10)
@queue = Queue.new
@threads = []
size.times do
# Common shell setup is in .profile.
source ~/.profile
# Path to your oh-my-zsh installation.
ZSH=/usr/share/oh-my-zsh/
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => General
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Sets how many lines of history VIM has to remember
set history=5000
" Enable filetype plugins
filetype plugin on
filetype indent on
@zquestz
zquestz / abc.md
Last active June 13, 2018 17:39
Bitcoin ABC Nodes - 7/31/2017

List was generated using https://github.com/zquestz/pickynode

This will connect your Bitcoin ABC node to all published ABC nodes on 7/31/2017

bitcoin-cli addnode "13.114.133.224:8333" "onetry"
bitcoin-cli addnode "37.221.198.57:28333" "onetry"
bitcoin-cli addnode "188.68.38.210:8333" "onetry"
bitcoin-cli addnode "[2a01:4f8:201:3e3::2]:8433" "onetry"
bitcoin-cli addnode "[2601:246:c701:5ec0:9551:4554:b18d:88ca]:8333" "onetry"