View _post.md

This is an image lol

View bitcoin-notes.md
  • https://chainquery.com/ is an amazing tool for debugging bitcoind rpc if you are too lazy to leave browser
  • if you call bitcoind RPC decoderawtransaction, you got size and (more imporantly) vsize for free
  • what is vsize for? It's important for segwit!
    • segwit txs have blockchain part and non-blockchain part
    • if you count fees, you need both
    • miners compare fees/kB, but not for actual size, but for virtual size, which is combined segwit and non-segwit length
    • virtual size = 3/4 size of non-segwit part + 1/4 total size (both segwit and non-segwit)
    • for whatever reason, bitcoin also has weight, which is 4 times the size
    • see BIP 141 for details on this confusing terminology
View keybase.md

Keybase proof

I hereby claim:

  • I am runn1ng on github.
  • I am karel_3d (https://keybase.io/karel_3d) on keybase.
  • I have a public key ASBGX-JMFaIqFWwTY-KTrGkdgZayRcsGLeZKYfpgHVk2Swo

To claim this, I am signing this object:

View segwit_block
000000200b5060a34560744533177d45594686e34a1f5cd1b9955823ee1e0000000000002c53b9146bf03f08ecf2c1a7a5f32b83c02072de90a906326d8b1c4435506828b95ee258c0b3271a086339ac1c010000
000001010000000000000000000000000000000000000000000000000000000000000000ffffffff3a032305110004b95ee25804edb2a2050c0256e158af6cb9582e8810001d2f4542f09f92a92f4144f09f98b12f434b506f6f6c5072696d
6172792fffffffff0200845909000000001976a914e58e176ed4e0b65af4719de10b28697a1cc8b59188ac0000000000000000266a24aa21a9ed88aec75a098d7e6c62f5c4697f16b0c45e29a8b20d2a67f9b4d648465b297dfe0120000000
00000000000000000000000000000000000000000000000000000000000000000001000000017ba5a565904f1c677c2aeff3660424669384b5ac878343b50b061a6c5f9c2d02010000006b483045022039e63f1757c2d39214d06cb209dc69
154431d7cdc41c3180bbc3add65928105f02210093e4ec14d97708e0408b806c1bad21deec5309077f734b9de338804d7668d0d3012103c89ee9fdb8ad9f181f89951a6f7e3d925fe37bab127a84581f31f93f3949c5dbffffffff0280ed3e
170000000017a9148a7af31832f4ae9499aee6c6e45d37fec90dce128709038ae7000000001976a914ecb9debff
View libusb-tr.py
import usb1
with usb1.USBContext() as context:
handle = context.openByVendorIDAndProductID(
21324,
1,
skip_on_error=True,
)
if handle is None:
print("nope")
View darek.js
function decimalAdjust(type, value, exp) {
if (exp === undefined || +exp === 0) {
return Math[type](value);
}
value = +value;
exp = +exp;
if (isNaN(value) || !(typeof exp === 'number' && exp % 1 === 0)) {
return NaN;
}
const valueSplit = value.toString().split('e');
View trezor-concurrent-bug3.py
#!/usr/bin/env python2
from trezorlib.client import TrezorClient
from trezorlib.transport_hid import HidTransport
import trezorlib.messages_pb2 as proto
import signal, os, time
globalClient = None;
View trezor-concurrent-bug2.py
#!/usr/bin/env python2
from trezorlib.client import TrezorClient
from trezorlib.transport_hid import HidTransport
import trezorlib.messages_pb2 as proto
import signal, os, time
globalClient = None;
def receiveSignal(signum, frame):
View trezor-concurrent-bug.py
#!/usr/bin/env python2
from trezorlib.client import TrezorClient
from trezorlib.transport_hid import HidTransport
import trezorlib.messages_pb2 as proto
import signal, os, time
globalClient = None;
def receiveSignal(signum, frame):
View paint.R
library(ggplot2)
library(gtable)
library(grid)
png(file="~/marketlifetimes.png", width = 1000, height = 850)
grid.newpage()