Skip to content

Instantly share code, notes, and snippets.

### Keybase proof
I hereby claim:
* I am wileyj on github.
* I am wileyj (https://keybase.io/wileyj) on keybase.
* I have a public key whose fingerprint is AE7B 37FD B634 A08F 8904 AC1A 2EF1 0D71 9C76 8737
To claim this, I am signing this object:
@wileyj
wileyj / sshd_config
Last active December 14, 2017 22:45
sshd_config
Port 22
Protocol 2
PidFile /var/run/sshd.pid
LogLevel INFO
SyslogFacility AUTH
PermitEmptyPasswords no
PubKeyAuthentication yes
DSAAuthentication yes
IgnoreRhosts yes
@wileyj
wileyj / ldd.py
Last active December 14, 2017 22:37
needs some error checking etc. as-is
#!/usr/bin/env python
import sys
import os
import argparse
import re
import errno
import stat
import pwd
import grp
# no longer needed since we hardcoded the mount cmd for now
@wileyj
wileyj / ldd-alinux.py
Last active December 19, 2017 23:41
ldd.py for alinux. some very minor differences between ldd.py and this one (paths mostly)
#!/usr/bin/env python
import sys
import os
import argparse
import re
import errno
import stat
import pwd
import grp
# no longer needed since we hardcoded the mount cmd for now
Verifying my Blockstack ID is secured with the address 13EWrxFrtcKgFas5kvm3kQhX86KLjhFpCM https://explorer.blockstack.org/address/13EWrxFrtcKgFas5kvm3kQhX86KLjhFpCM
@wileyj
wileyj / verify.py
Created December 3, 2020 16:17
Verify MD5hash from GCS
import base64
import hashlib
source = [
"/path/to/chainstate.txt", # < -- edit this path
"/path/to//chainstate.txt.sha256" # < -- edit this path
]
for file in source:
hash_md5 = hashlib.md5()
with open(file, "rb") as f:
for chunk in iter(lambda: f.read(4096), b""):
@wileyj
wileyj / gist:4959035d85ed5e358788e267745d1d4e
Last active January 26, 2022 04:09
stacks-node init-style script
#!/bin/sh
NETWORK=$1
OP=$2
BINARY=stacks-node
BASEDIR=$HOME/stacks-blockchain
usage () {
echo ""
echo "$0 (mocknet|testnet|mainnet) (start|stop|restart)"
@wileyj
wileyj / info.py
Last active February 2, 2022 19:29
stacks-node info parser
#!/usr/bin/env python3
import aiohttp
import asyncio
import time
from time import sleep
import math
from prometheus_client.parser import text_string_to_metric_families
urls = [
'http://localhost:20443/v2/neighbors',
@wileyj
wileyj / stacks-mining.md
Last active February 23, 2022 19:34
stacks-mining

Stacks Blockchain Miner

https://docs.stacks.co/start-mining/mainnet

Prerequisites

VM setup

The VM will not need a lot of resources to run a miner - the most resources will be consumed during blockchain sync.
A single CPU system with at least 4GB of memory should be more than sufficient - as well as roughly 1TB of total disk space