command | function | usage | notes |
---|---|---|---|
scp | remote -> local | scp uname@remotehost:filename /local/dir | |
scp | local -> remote | scp filename uname@remotehost:/remote/dir | |
tar | untar to dir | tar -xfv archive.tar -C /target/directory | (create dir first) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import print_function | |
from bcc import BPF, USDT | |
import sys | |
from datetime import datetime | |
if len(sys.argv) < 2: | |
print("USAGE:", sys.argv[0], "path/to/bitcoind") | |
exit() | |
path = sys.argv[1] | |
debug = False |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Date.prototype.toYYYYMMDDString = function () { | |
return this.getFullYear() + "-" + ("0" + (this.getMonth()+1)).slice(-2) + "-" + ("0" + this.getDate()).slice(-2); | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# requires https://github.com/petertodd/python-bitcoinlib | |
# just retry if a TypeError occurs on nodes without tx indexing (e.g. pruned nodes) | |
import bitcoin | |
import bitcoin.rpc | |
rpc = bitcoin.rpc.RawProxy() | |
rawmempool = rpc.getrawmempool(False); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# last bucket with more than 2^14 sat/byte | |
BUCKETCOUNT = 200 | |
# defines a 5% increase per bucket | |
# https://github.com/bitcoin/bitcoin/commit/e5007bae35ce22036a816505038277d99c84e3f7#diff-8c0941572d1cdf184d1751f7b7f1db4eR109 | |
FEE_SPACING = 1.05 | |
# list of fee buckets |
I hereby claim:
- I am 0xb10c on github.
- I am b10c (https://keybase.io/b10c) on keybase.
- I have a public key whose fingerprint is 470B 847C 88D0 4928 77B7 F15D E462 234D D056 4D4A
To claim this, I am signing this object:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String.prototype.toDHHMMSS = function () { | |
var sec_num = parseInt(this, 10); | |
var days = Math.floor(sec_num / 86400) | |
var hours = Math.floor((sec_num - (days * 86400)) / 3600); | |
var minutes = Math.floor(((sec_num - (days * 86400)) - (hours * 3600)) / 60); | |
var seconds = sec_num - (days * 86400) - (hours * 3600) - (minutes * 60); | |
if (hours < 10) {hours = "0"+hours;} | |
if (minutes < 10) {minutes = "0"+minutes;} | |
if (seconds < 10) {seconds = "0"+seconds;} |
NewerOlder