Skip to content

Instantly share code, notes, and snippets.

View takinbo's full-sized avatar

Tim Akinbo takinbo

View GitHub Profile
{'downloader/exception_count': 1801,
'downloader/exception_type_count/twisted.internet.error.ConnectionRefusedError': 4,
'downloader/exception_type_count/twisted.internet.error.TimeoutError': 5,
'downloader/exception_type_count/twisted.web._newclient.ResponseNeverReceived': 1792,
'downloader/request_bytes': 8780679,
'downloader/request_count': 10100,
'downloader/request_method_count/GET': 2,
'downloader/request_method_count/POST': 10098,
'downloader/response_bytes': 12366649,
'downloader/response_count': 8299,
Verifying that +takinbo is my blockchain ID. https://onename.com/takinbo
@takinbo
takinbo / lnd-python-client.md
Created January 29, 2017 23:27
Writing a Python gRPC client for the Lightning Network Daemon

How to write a Python gRPC client for the Lightning Network Daemon

  • Create a virtual environment for your project
$ virtualenv lnd
  • Activate the virtual environment
$ source lnd/bin/activate
@takinbo
takinbo / stream.js
Created February 20, 2017 17:53
stream trading events from Luno.com
var WebsocketClient = require('websocket').client,
colors = require('colors'),
sprintf = require('sprintf-js').sprintf;
var ws = new WebsocketClient();
var asks = bids = {};
var now = function () {
var date = new Date();
return sprintf("%02d:%02d:%02d", date.getHours(), date.getMinutes(), date.getSeconds());
@takinbo
takinbo / 70-hwrng.rules
Created May 31, 2018 21:12
udev rules for the ElectroDoodle TRNG-N1
# ElectroDoodle TRNG-N1 │ rgb_bitdist| 2| 100000| 100|0.25684952| PASSED
SUBSYSTEM=="tty", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="5740", SYMLINK+="hwrng", RUN+="/usr/bin/stty -F /dev/%k 115200 raw", T│ rgb_bitdist| 3| 100000| 100|0.39832547| PASSED
AG+="uaccess"
@takinbo
takinbo / docker-compose.yml
Created March 23, 2019 15:08
docker-compose.yml file for NBXplorer
version: "3"
services:
nbxplorer:
restart: always
build:
context: https://github.com/dgarage/NBXplorer.git#v2.0.0.21
dockerfile: Dockerfile.linuxamd64
env_file: nbxplorer.env
network_mode: host
@takinbo
takinbo / nbxplorer.env
Created March 23, 2019 15:13
nbxplorer environment file
NBXPLORER_NETWORK=mainnet
NBXPLORER_BIND=127.0.0.1:24444
NBXPLORER_NOAUTH=1
NBXPLORER_CHAINS=btc
NBXPLORER_BTCRPCURL=http://127.0.0.1:8332/
NBXPLORER_BTCNODEENDPOINT=127.0.0.1:8333
NBXPLORER_BTCRPCAUTH=rpcuser:rpcpassword
@takinbo
takinbo / explorer.conf
Created July 9, 2019 09:28
sample nginx configuration for blockstream esplora
server {
listen 80;
server_name explorer.local;
location ~ ^/api(/?)(.*) {
proxy_pass http://127.0.0.1:4000/$2;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
@takinbo
takinbo / 584802.hex
Created July 10, 2019 16:23
Invalid Block #584802
00004020f1f9b8c77a42e502101978707f5de1896176ac1f3b251b0000000000000000007f5a9b94bc04c945693178e32eeae20f5066d7cde08c72001bdd5842da314a7aadf7255d9b0d1f1700e4a56d01010000000001010000000000000000000000000000000000000000000000000000000000000000ffffffff550362ec081c4d696e656420627920416e74506f6f6c313132ee003300200f0c9c50fabe6d6dc0ba0d6922d0606afa6321ef35c91f070cb29a0425d4ffef18f70658908db8b6040000000000000033060000b43f0000ffffffff02037f114f000000001976a914edf10a7fac6b32e24daa5305c723f3de58db1bc888ac0000000000000000266a24aa21a9ede2f61c3f71d1defd3fa999dfa36953755c690689799962b48bebd836974e8cf90120000000000000000000000000000000000000000000000000000000000000000000000000
@takinbo
takinbo / ban_spy.sh
Last active September 17, 2019 07:12
ban bitcoin spy nodes
bitcoin-cli listbanned | jq -r '.[] | select(.ban_reason=="manually added") | .address' | xargs -P 10 -i -- bitcoin-cli setban {} remove \
&& curl -s https://people.xiph.org/\~greg/banlist.gui.txt | xargs -P 10 -L 1 bitcoin-cli