Skip to content

Instantly share code, notes, and snippets.

@xjmzx
xjmzx / npub.txt
Last active April 17, 2026 17:21
npub
8d44a2e4fff09f8d113598f57f94e3ffc90be06700e08a0f83646acc33d269fe
### Keybase proof
I hereby claim:
* I am xjmzx on github.
* I am pangolino (https://keybase.io/pangolino) on keybase.
* I have a public key ASClFKUo8kdomQKy7X8-km42rAVaiyhKOJ6cwjZP4hpOGwo
To claim this, I am signing this object:
@xjmzx
xjmzx / regoformat.txt
Last active April 16, 2023 21:51
lncli listchannels then sort from high inbound to high outbound liquidity (toml readible)
lncli listchannels | tr -d '",' |
awk '/chan_id|capacity|local_balance|remote_balance|peer_alias/{print $1 $2 $3 $4",";
if(/capacity/){ capacity = $2 }
if(/local_balance/){ printf "%08.4f%%, \n", capacity / $2 }}' |
sed 'N;N;N;N;N;s/\n/ /g' | sort -k 4nr | awk '{print $1 $4 $6}' |
sed 's/,/", # /' | sed 's/%,/% /' |
sed 's/chan_id:/"/' | sed 's/peer_alias:/ /' | sed 's/.$//' | sed '$s/,/ /'