Skip to content

Instantly share code, notes, and snippets.

@a5an0
Last active June 30, 2021 05:20
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save a5an0/0059b805063e0b915f286244bdcb1ea6 to your computer and use it in GitHub Desktop.
Save a5an0/0059b805063e0b915f286244bdcb1ea6 to your computer and use it in GitHub Desktop.

Want to build a PlebClock? You're in the right place!

On your node, do sudo apt install -y figlet jq

then edit the ~/.bashrc file and add this line:

alias plebclock="watch -t -n 10 'date \"+%I : %M\" | figlet -f small; bitcoin-cli getblockcount | figlet -f small; expr 100000000 / $(curl https://api.coindesk.com/v1/bpi/currentprice.json 2>/dev/null | jq -r .bpi.USD.rate | sed s/,// | cut -d . -f 1) | figlet -f small'"

now log out and log back in.

type plebclock

enjoy!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment