Skip to content

Instantly share code, notes, and snippets.

@baebb
baebb / bitcoind-electrs-ubuntu-install
Last active July 13, 2023 15:44 — forked from rjmacarthy/bitcoind-ubuntu-install
Install bitcoind and electrs Ubuntu
** Add repository and install bitcoind **
sudo apt-get install build-essential
sudo apt-get install libtool autotools-dev autoconf
sudo apt-get install libssl-dev
sudo apt-get install libboost-all-dev
sudo add-apt-repository ppa:luke-jr/bitcoincore
sudo apt-get update
sudo apt-get install bitcoind
mkdir ~/.bitcoin/ && cd ~/.bitcoin/
@baebb
baebb / gist:9956c2d847f4f04d0f4dcdf6f064548c
Last active December 7, 2019 06:23
Earning by Learning test payload
{
test_name: string,
test_description: string,
test_video: string, //url
test_questions: [
{
question_id: integer,
question_text: string,
question_options: [
{
@baebb
baebb / getLightningInvoiceAmount.js
Last active July 12, 2019 07:41
Get amount from Lightning invoice string
import _ from 'lodash';
const getInvoiceAmount = (invoice) => {
const cleanInvoice = invoice.toLowerCase();
let removedNetwork;
if (_.startsWith(cleanInvoice, 'lnbc')) {
removedNetwork = cleanInvoice.replace('lnbc', '');
} else if (_.startsWith(cleanInvoice, 'lntb')) {
removedNetwork = cleanInvoice.replace('lntb', '');