Skip to content

Instantly share code, notes, and snippets.

@tyzbit
tyzbit / get-lnd-stats.sh
Last active April 5, 2018 16:07
get-lnd-stats - periodically query the lnd daemon for stats, then ship it off to Splunk
#!/bin/bash
token="[SPLUNK_TOKEN_HERE]"
endpoint="http://[SPLUNK_SERVER_HERE]:8088/services/collector/event"
lncli="/home/$USER/gocode/bin/lncli"
commands=(
"getinfo"
"listpeers"
"walletbalance"
@tyzbit
tyzbit / README.md
Last active October 31, 2023 21:49 — forked from vasturiano/.blocks.json
The Lightning Network (Mainnet)

Forked from vasturiano, with dataset and minor other changes.

The Lightning Network as seen from my node at about 18:49 UTC on 1-28-2018.

Nodes are colored according to settings set by the node operators. Lines are channels between nodes. Nodes that fly off into the background do not have any visible channels. Line colors are representative of the channel capacity, but is colored dynamically.

@tyzbit
tyzbit / README.md
Last active June 6, 2018 00:27
The Lightning Network (Mainnet)

Forked from vasturiano, with dataset and minor other changes.

The Lightning Network as seen from my node at about 00:30 UTC on June 7 2018. This data is updated manually, not automatically.

Nodes are colored according to settings set by the node operators. Nodes are sized according to the total amount of BTC in channels they have open. Lines are channels between nodes. Nodes that fly off into the background don't have any channels my node knows about. Line colors are representative of the channel capacity, but is colored dynamically.

Click on a node to see its address info and capacity.

@tyzbit
tyzbit / README.md
Last active June 6, 2018 00:28
The Lightning Network (Testnet)

Forked from vasturiano, with dataset and minor other changes.

The Lightning Network as seen from my node at 00:30 UTC on June 7 2018. This data is updated manually, not automatically.

Nodes are colored according to settings set by the node operators. Nodes are sized according to the total amount of BTC in channels they have open. Lines are channels between nodes. Nodes that fly off into the background don't have any channels my node knows about. Line colors are representative of the channel capacity, but is colored dynamically.

Click on a node to see its address info and capacity.

@tyzbit
tyzbit / README.md
Last active April 6, 2018 23:26
Lightning-VR
@tyzbit
tyzbit / Useful lncli aliases.md
Last active July 24, 2021 23:57
Useful commands/aliases for interacting with LND using lncli (https://github.com/lightningnetwork/lnd)

I am not responsible, directly or indirectly for the loss of funds using these commands. Use at your own risk.

Informational Commands

lrecv

Channels with received satoshis

alias lrecv="lncli listchannels | jq '[ .channels | .[] | select(.total_satoshis_received|tonumber>0) ]'"

loffchain

Channels with offchain transactions

@tyzbit
tyzbit / 1-Users and Use Cases.md
Last active April 23, 2018 05:03
Lightning Network Users and Use Cases

Lightning Network User Use Cases

The Lightning Network is a layer 2 payment network built on top of Bitcoin (and other cryptocurrencies).

It is denominated in the currency of the blockhain upon which it sits (first and primarily Bitcoin), and disputes are settled entirely by the base blockchain (Bitcoin).

Like Bitcoin, it is decentralized. Ultimately, the utility, speed and cost of the network will be defined by

@tyzbit
tyzbit / README.md
Last active May 4, 2018 16:00
Historical Lightning Data

Forked from vasturiano, with dataset and minor other changes.

Historical data of The Lightning Network as seen from my node from Thu Jan 25 to Feb 21. This data was generated manually, not automatically.

Nodes are colored according to settings set by the node operators. Nodes are sized according to the total amount of BTC in channels they have open. Lines are channels between nodes. Nodes that fly off into the background don't have any channels my node knows about. Line colors are representative of the channel capacity, but is colored dynamically.

Click on a node to see its address info and capacity.

@tyzbit
tyzbit / update-adblock.sh
Created February 24, 2018 14:33
Update Adblock on OPNSense v17 (and possibly above)
#!/bin/sh
## Clean up any stale tempfile
echo "Removing old files..."
[ -f /tmp/hosts.working ] && rm -f /tmp/hosts.working
## Awk regex to be inverse-matched as whitelist
# - Project Wonderful does unobtrusive ads on a lot of webcomics
# - SolveMedia is needed for captchas on some websites
#whitelist='/(projectwonderful.com|api.solvemedia.com)/'
@tyzbit
tyzbit / bashrc.sh
Created March 9, 2018 22:02
Bash Prompt Timestamp and colored kubectl info
export UPDATE_TIME=0
promhostname=$(hostname | cut -d'.' -f1)
#grab the 8 characters after the first part of the hostname (ABC-lx00000000)
hostname=$(hostname|cut -c9-15|cut -d'.' -f1)
#if the hostname is less than 8 characters, pad it with dashes until it's 8 characters
i=0;while [ $(echo $hostname | wc -m) -le 8 ]; do
[ $i = 0 ] && hostname=$(echo $hostname"-") || hostname=$(echo "-"$hostname); i=$((1-i))
done