Skip to content

Instantly share code, notes, and snippets.

View brianddk's full-sized avatar

brianddk

View GitHub Profile
@brianddk
brianddk / vbox-usb.md
Last active January 27, 2022 06:21
Win 10 21H1 + VirtualBox 6.1 + WSL-2 + usbipd-win v2

Win 10 21H1 + VirtualBox 6.1 + WSL-2 + usbipd-win v2

@brianddk
brianddk / cb-get-candles.py
Created March 8, 2020 00:31
Historic Daily Market Data GBP
# [rights] Copyright 2020 brianddk at github https://github.com/brianddk
# [license] Apache 2.0 License https://www.apache.org/licenses/LICENSE-2.0
# [repo] https://gist.github.com/brianddk/866ee3296666acda358e05172682b6d8
# [btc] BTC-b32: bc1qwc2203uym96u0nmq04pcgqfs9ldqz9l3mz8fpj
# [tipjar] https://gist.github.com/brianddk/3ec16fbf1d008ea290b0
# [ref] https://docs.pro.coinbase.com/#get-historic-rates
# [post] https://redd.it/fexxlo/
from json import dumps
from datetime import datetime as dt
@brianddk
brianddk / bip137-sig.py
Last active September 19, 2019 21:17
BIP-137-iffy Signatures
#!/usr/bin/env python3
# [rights] Copyright brianddk 2019 https://github.com/brianddk
# [license] Licensed under Apache 2.0 https://www.apache.org/licenses/LICENSE-2.0
# [repo] https://gist.github.com/brianddk/a26344a0f06f64bcd5a102a3bed164de
# [version] Version 0.1
# [lntip] BTCLN: https://tippin.me/@dkbriand
# [btctip] bc1qwc2203uym96u0nmq04pcgqfs9ldqz9l3mz8fpj
# [tipjar] https://gist.github.com/brianddk/3ec16fbf1d008ea290b0
# [msg] bip137-sig.py get_digest_msg
# [sig] KKIBghUdYV8Mp1P2d6eyjWTEnuonthYE+M7plxfnzVFoJouFoVzIzOGskBt3G33WhfgnYhkG+OxZggMUdTT+vy8=
@brianddk
brianddk / bitcoin_for_kids.md
Last active February 10, 2021 09:30
Bitcoin For Kids

Assuming you have a willing parent or guardian, here's an example of how that would work for a minor in the US via CashApp. Ensure your upfront with the parent or guardian as to what your doing.

  1. Get a summer job with some source of direct deposit income.
  2. Ask your legal guardian to help you open a "Youth Spending" checking account also called UTMA.
  3. Ask for a debit card attached to the account.
  4. Have your summer job paychecks direct deposited to the account.
  5. Download the CashApp and link it to your phone number AND email.
  6. Link the CashApp to your Youth Spending Debit card and checking account.
  7. Attempt to transfer $25 from your debit card into your CashApp, assuming you have the money.
  8. Ask your guardian to fill in their SSN when prompted.
@brianddk
brianddk / +Readme.md
Last active January 16, 2021 20:57
Crypto Cost

Crypto Cost

@brianddk
brianddk / +README.md
Last active July 13, 2019 08:37
Bitcoin Lightning Fee simulator

Lighting network simulator

This is a very simple python program that will simulate a few conditions. For the ground work lets set up an Alice and Bob story.

Bob's friend Alice sets up a coffee shop. She is going to start taking cryptocurrency at the coffee shop, so she is set up to accept Bitcoin Cash (BCH) and Bitcoin Core via Lightning (BTCLN). Bob has a substantial holding in both BTC and BCH, though it is all in cold storage in a HW wallet. He does have a Coinbase account but is always very careful to calculate trading fees. So now Bob wants to determine what would be the best way to get ready to move his daily coffee patronage to Alice's shop.

Looking over his past expenses on morning coffee, he decides that 20,000 satoshis (BTC) should be a nice round number for lattes and perhaps 19,000 for coffee. Since BTC is trading at $10,600, his budget in terms of fiat comes out to just about $2 a day. With his budget in hand, he goes about reviewing the BCH and BTCLN payment options. He suspects BTC

@brianddk
brianddk / adbremote.txt
Last active November 30, 2020 00:52
ADB Remote
http://marian.schedenig.name/2014/07/03/remote-control-your-android-phone-through-adb/
https://github.com/MajeurAndroid/Adb-Remote-Screen
https://github.com/oberien/adb-remote-control
https://android.gadgethacks.com/how-to/fully-control-your-android-device-from-any-computer-0164097/
GNURoot SH
https://gist.github.com/kbeflo/ccaf34f4515670d84b37719c067300c7
@brianddk
brianddk / trezor_one_fw_upgrade.cmd
Last active February 28, 2019 01:56
Windows batch trezor FW upgrade
@echo off
rem choco install -y openssl.light
rem choco install -y wget
rem choco install -y cygwin
rem tail -c +257 trezor.signed.bin | sha256sum
rem https://crt.sh/?q=26AFA022ADC5EE7E41A5226C1DE336D438F1AD0F
setlocal
set tail=%ChocolateyToolsLocation%\cygwin\bin\tail.exe
set sha256sum=%ChocolateyToolsLocation%\cygwin\bin\sha256sum.exe
set openssl="%ProgramFiles%\OpenSSL\bin\openssl.exe"
@brianddk
brianddk / trezor_encrypt.py
Last active December 16, 2020 14:40
Trezor Offline Encrypt / Decrypt Sample Scripts
#!/usr/bin/env python3
# [rights] Copyright Dan B. (brianddk) 2019 https://github.com/brianddk
# [license] Licensed under Apache 2.0 https://www.apache.org/licenses/LICENSE-2.0
# [repo] https://gist.github.com/brianddk/4d7c44c0cd97b62a810c1b5a9d50af8d
# [version] Version 0.2
# [tipjar] LTC: LQjSwZLigtgqHA3rE14yeRNbNNY2r3tXcA
# [erratta] https://github.com/pyusb/pyusb/issues/203
# - Must use libusb-1.0.dll v1.0.21
# - Must install trezor[hidapi] v11.1
# [test] dir | trezor_encrypt.py | trezor_encrypt.py -d
@brianddk
brianddk / trezor-wallet-search.py
Last active May 10, 2021 18:33
Trezor HW wallet search utility
#!/usr/bin/env python3
# [rights] Copyright Dan B. (brianddk) 2019 https://github.com/brianddk
# [license] Apache 2.0 License https://www.apache.org/licenses/LICENSE-2.0
# [repo] https://gist.github.com/brianddk/e655a2a30f68cd5d981b69ec4b709d9c
# [tipjar] LTC: LQjSwZLigtgqHA3rE14yeRNbNNY2r3tXcA or https://git.io/fh6b0
# [refered] https://www.reddit.com/r/TREZOR/comments/ak2mej/
# [erratta] https://github.com/pyusb/pyusb/issues/203
# - Must use libusb-1.0.dll v1.0.21
# https://github.com/ethereum/pyethereum/issues/888
# - Must install trezor[hidapi]