Skip to content

Instantly share code, notes, and snippets.

urza /
Last active April 11, 2023 15:21
CLN (Core Lightning)

show list of open channels, their id, short id and remote node alias


lightning-cli listpeers | jq -r '.peers[] | select(.channels != null) | .id' | while read -r id; do
  channel_info=$(lightning-cli listpeers "$id" | jq -r ".peers[0].channels[] | {id: \"${id}\", short_channel_id: .short_channel_id}")
  alias=$(lightning-cli listnodes "$id" | jq -r ".nodes[0].alias")
 echo "$channel_info" | jq --arg alias "$alias" '. + {alias: $alias}'
urza / yt-whisper
Created April 6, 2023 13:31 — forked from jooray/yt-whisper
A script to download an audio from a video from a streaming platform such as youtube and transcribe it to text using whisper.cpp
View yt-whisper
# If OUTPUT_FILENAME_TEMPLATE is empty, output is yt-whisper-video
# If LANGAUGE is empty, it is set to "auto"
# General settings (paths) for whisper.cpp
# Note - this uses whisper.cpp, not official whisper. Get it at
# You will have to adjust these
urza /
Last active September 16, 2021 13:30


calmness and composure, especially in a difficult situation. "she accepted both the good and the bad with equanimity"

Equanimity (Latin: æquanimitas, having an even mind) is a state of psychological stability and composure which is undisturbed by experience of or exposure to emotions, pain, or other phenomena that may cause others to lose the balance of their mind.


Neither a thought nor an emotion, it is rather the steady conscious realization of reality's transience. It is the ground for wisdom and freedom and the protector of compassion and love. While some may think of equanimity as dry neutrality or cool aloofness, mature equanimity produces a radiance and warmth of being. The Buddha described a mind filled with equanimity as "abundant, exalted, immeasurable, without hostility and without ill-will."

urza / ParallelWPFProfress.cs
Last active April 22, 2021 20:24
View ParallelWPFProfress.cs
private async void btnWordStatsParallelInTaskWithProgress_Click(object sender, RoutedEventArgs e)
txbResultsInfo.Text = "";
IProgress<string> progress = new Progress<string>(message =>
txbResultsInfo.Text += message;
await Task.Run(() => Parallel.ForEach(_files, (file) =>
urza / parallelWPF.cs
Last active April 22, 2021 19:56
Paralallel continuation
View parallelWPF.cs
private void btnWordStatsParallelInTask_Click(object sender, RoutedEventArgs e)
10 nejcastejsich slov v kazdem souboru - paralelně
txbResultsInfo.Text = "";
Stopwatch w = new Stopwatch();
Mouse.OverrideCursor = System.Windows.Input.Cursors.Wait;
urza / Program.cs
Created December 28, 2020 16:51
c# microbenchmark
View Program.cs
// needs C# 9.0 or newer (top level statements)
// will utilize 100 % CPU and print elapsed seconds when finished
// Ryzen 5900x - cca 150 seconds
// you can also use int.MaxValue / 100 for shorter run
using System;
using System.Threading.Tasks;
var d = DateTime.Now;
Parallel.For(0, int.MaxValue, _ => new Random() );
urza /
Last active February 21, 2019 23:39
command line arguments
Command line arguments for miner.
General format is: arg1=value1 arg2=value2 etc.
Linux: ./GrinProMiner configpath=/absolute/path/to/directory api-port=3333
Windows: GrinProMiner.exe configpath=C:\absolute\path\to\directory api-port=3333
"configpath" Defines directory where to save or load config.xml file from.
Linux: ./GrinProMiner configpath=/absolute/path/to/directory
Windows: GrinProMiner.exe configpath=C:\absolute\path\to\directory
urza /
Last active February 20, 2019 15:22
View miner local API documentation

When miner starts mining it also starts listening on The port can be changed by argument "api-port" at startup e.g. ./GrinProMiner api-port=6666 Four zeroes in the listening IP address means, that it can be accessed also from other computers on the network, not just localhost. So it may look something like depending on your IP address.

The root URL returns simple HTML dasboard with basic info about the miner.


View gist:9ab3493e8416e28ee3559436084cd493
PB[Nainoa (1637)]
PW[shushuho (1828)]

Keybase proof

I hereby claim:

  • I am urza on github.
  • I am urza ( on keybase.
  • I have a public key ASCUoz08ZGxMJNvNxTgW_sdlLYyFkcHdkQpVq3V_ULE2_Ao

To claim this, I am signing this object: