Skip to content

Instantly share code, notes, and snippets.

👨‍💻
Lightning Networking

Damian Mee meeDamian

👨‍💻
Lightning Networking
Block or report user

Report or block meeDamian

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View arm64bits
This file has been truncated, but you can view the full file.
@meeDamian
meeDamian / README.md
Last active Sep 1, 2019
Tippin.me donation badge
View README.md

Tippin.me donation badge

Tippin.me donation Tippin.me donation

Markdown (yellow):

[![Tippin.me donation](https://img.shields.io/badge/donate-lightning-FDD023?logo=bitcoin&style=flat)](https://tippin.me/@meeDamian)
View lightning-cli-listpeers.json
[
{
"id": null,
"connected": true,
"netaddr": [
null
],
"globalfeatures": "",
"localfeatures": "81",
"channels": [
View 1 output.sh
#!/bin/bash
RAWTX=$(bitcoin-cli createrawtransaction '[{"txid": "c09fc1b73260c5b5d0fd270de49c6c56d8fe6dc169cdfda75273c506bd1cb695", "vout": 0}]' '[{"tb1qncs4ju7gqu4hsc29ccyzvzk0dkste5xs03aaq7": 0.00000001}]' 0 true)
SIGNEDTX=$(bitcoin-cli signrawtransactionwithkey "${RAWTX}" '["'$(bitcoin-cli dumpprivkey tb1q9vugfwpwzac9wkzrhcq0zxfkszgy60ydsghp0f)'"]' | jq -r '.hex')
bitcoin-cli decoderawtransaction ${SIGNEDTX} | jq '. | del(.vout) | del(.vin)'
{
"txid": "230de7441de94670a64dfddd141aacb117b0cb2a542451dfb4efad4ea533b6ab",
"hash": "a1a0168b7382bb29c503868105c07b6e8c5db21f6e96d76900f24794b9102c46",
@meeDamian
meeDamian / ipfs-refs-daemon.sh
Created Aug 18, 2019 — forked from kyledrake/ipfs-refs-daemon.sh
IPFS replication service with one line of unix shell code!
View ipfs-refs-daemon.sh
#!/bin/bash
# First, install ncat: http://nmap.org/ncat/
# Usually comes with the 'nmap' package on distributions.
ncat -k -v -l -p 5555 -c 'ipfs refs local | gzip'
# To retrieve on the client machine:
# nc 127.0.0.1 5555 | gunzip | ipfs pin add -r
View backup-lnd.sh
#!/usr/bin/env bash
trap "exit" INT
HOSTS=( ln@pi-hdd lnd@pi-other )
echo -e "\nCreating backups for ${#HOSTS[*]} hosts…"
@meeDamian
meeDamian / 7z
Created May 8, 2019
Compression comparison
View 7z
/tmp|⇒ /usr/bin/time -l 7z a -t7z -m0=lzma -mx=9 -mfb=64 -md=32m -ms=on bitcoin-blocks.7z ~/Library/Application\ Support/Bitcoi
n/blocks
412.70 real 379.01 user 7.50 sys
395800576 maximum resident set size
0 average shared memory size
0 average unshared data size
0 average unshared stack size
97211 page reclaims
35 page faults
@meeDamian
meeDamian / README.md
Created Apr 30, 2019
Samourai Wallet backend server
View README.md

If you ever wondered what info about you, Samourai Wallet sends back home, here is how you can see it.

Combine domain with path, to get sth like:

https://api.samouraiwallet.com/v2/multiaddr?active=
@meeDamian
meeDamian / blockchain-growth-btc-bch.sh
Last active Apr 25, 2019
Fetches and compares blockchain size growth between BTC & BCH.
View blockchain-growth-btc-bch.sh
#!/bin/bash
BLOCKCHAIN_INFO_URL="https://api.blockchain.info/charts/blocks-size?timespan=2years&format=csv"
VERy_BITCOIN="https://charts.bitcoin.com/bch/api/chart/blockchain-size"
SPLIT_DATE="2017-08-01"
# I use date for two days ago, as depending on your TZ, bc.info might not have the data yet
RECENT_DATE="$(date -v-2d +%F)"
View chart.json
[[1315872000, 5.800000000000, 6.000000000000, 5.650000000000, 5.970000000000, 58.371382380000, 346.097389394400, 5.929230648356], [1315958400, 5.580000000000, 5.720000000000, 5.520000000000, 5.530000000000, 61.145983620000, 341.854813234800, 5.590797514344], [1316044800, 5.120000000000, 5.240000000000, 5.000000000000, 5.130000000000, 80.140795200000, 408.259002164000, 5.094271914137], [1316131200, 4.820000000000, 4.870000000000, 4.800000000000, 4.850000000000, 39.914006800000, 193.763146600000, 4.854515047084], [1316217600, 4.870000000000, 4.870000000000, 4.870000000000, 4.870000000000, 0.300000000000, 1.461000000000, 4.870000000000], [1316304000, 4.870000000000, 4.920000000000, 4.810000000000, 4.920000000000, 119.812800000000, 579.843102741000, 4.839575594102], [1316390400, 4.900000000000, 4.900000000000, 4.900000000000, 4.900000000000, 20.000000000000, 98.000000000000, 4.900000000000], [1316476800, 4.920000000000, 5.660000000000, 4.920000000000, 5.660000000000, 89.280710680000, 481.049262911600, 5.388053693
You can’t perform that action at this time.