Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Janaka-Steph Janaka-Steph

🎯
Focusing
Block or report user

Report or block Janaka-Steph

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@Janaka-Steph
Janaka-Steph / keybase_backup.sh
Created Feb 5, 2019 — forked from dwallraff/keybase_backup.sh
Encrypted tarball backup for keybase private folder backup
View keybase_backup.sh
## Encrypt
tar cz * | openssl enc -e -aes-256-cbc -salt -out keybase_`date "+%Y%m%d"`.tar.gz.enc
## Decrypt
openssl enc -d -aes-256-cbc -salt -in <ENCRYPTED_KEYBASE_TARBALL> | tar xvz
## Crontab
10 12 * * * cd /Users/dwallraff/backups && tar cz /keybase/private/dwallraff | openssl enc -e -aes-256-cbc -salt -k $PASSWORD -out keybase_`date "+%Y%m%d"`.tar.gz.enc >/dev/null 2>&1
@Janaka-Steph
Janaka-Steph / generate_wallets.js
Last active Jan 20, 2019
Generate wallets (Alice, Bob, Carol), create a json file and import private keys to Bitcoin Core
View generate_wallets.js
/**
* Generate wallets (Alice, Bob, Carol), create a json file and import private keys to Bitcoin Core
*
* BIP32 methods
* - fromBase58
* - fromPrivateKey
* - fromPublicKey
* - fromSeed
*
* BIP39 methods
@Janaka-Steph
Janaka-Steph / generate_testing_wallets.sh
Last active Nov 13, 2018
Generate testing wallets and import private keys to Bitcoin Core
View generate_testing_wallets.sh
#!/usr/bin/env bash
# This shebang line will use the first bash in your PATH, which should be 4.x
# Bash 4.x is required for this script
# Libbitcoin-explorer (bx)
# Configure bx.cfg config file to testnet values for testnet
# Not all commands accept --version option
# Associative arrays are stored in a 'hash' order, so no ordering.
# Name: entropy
@Janaka-Steph
Janaka-Steph / int2lehex.sh
Created Nov 5, 2018
Integer to Little endian hex Conversion Script for Bitcoin Script
View int2lehex.sh
#!/bin/bash
if [ -z $1 ];
then
echo "You must include an integer as an argument.";
exit;
fi
if (( $1 > "2147483647" )) || (( $1 < "-2147483647" ));
then
@Janaka-Steph
Janaka-Steph / baseConverter.js
Created Oct 30, 2018
Convert From/To Binary/Decimal/Hexadecimal in JavaScript + calculate byte length
View baseConverter.js
const convert = {
bin2dec : s => parseInt(s, 2).toString(10),
bin2hex : s => parseInt(s, 2).toString(16),
dec2bin : s => parseInt(s, 10).toString(2),
dec2hex : s => parseInt(s, 10).toString(16),
hex2bin : s => parseInt(s, 16).toString(2),
hex2dec : s => parseInt(s, 16).toString(10),
lenBytesDec: bin => (bin.length/8).toString(10),
lenBytesHex: bin => (bin.length/8).toString(16),
}
@Janaka-Steph
Janaka-Steph / lnchannels
Created Oct 27, 2018
Script to get detailed info about LND channels
View lnchannels
#!/bin/bash
# RaspiBolt channel overview display, by robclark56
# make executable & copy to
# /usr/local/bin/lnchannels
# current user must be able to execute bitcoin-cli and lncli
# Usage
# $ lnchannels to display lnd mainnet channels
# $ lnchannels --testnet to display lnd testnet channels
@Janaka-Steph
Janaka-Steph / lnbalance
Created Oct 27, 2018
Script to get detailed info about LND wallet balance and channels
View lnbalance
#!/bin/bash
# RaspiBolt channel balance display, by robclark56
# make executable & copy to
# /usr/local/bin/lnbalance
# current user must be able to execute bitcoin-cli and lncli
# Usage
# $ lnbalance to display lnd mainnet status
# $ lnbalance --testnet to display lnd testnet status
@Janaka-Steph
Janaka-Steph / 20-thundroid-welcome
Last active Oct 21, 2018 — forked from Stadicus/20-thundroid-welcome
Thundroid: System overview MotD
View 20-thundroid-welcome
#!/bin/bash
# by Stadicus & JanakaSteph
# copy script to /etc/update-motd.d/ and make it executable (chmod +x)
# /etc/update-motd.d/20-thundroid-welcome
# root must be able to execute bitcoin-cli and lncli
# Set colors
###
color_red='\033[0;31m'
color_green='\033[0;32m'
View gist:53a1dd717268e2c049f7f8ed91daa1a9
### Keybase proof
I hereby claim:
* I am janaka-steph on github.
* I am janakasteph (https://keybase.io/janakasteph) on keybase.
* I have a public key ASCh5w4yksWUmV120H5lu5I26NLx9zC4Djes317AtA52MQo
To claim this, I am signing this object:
@Janaka-Steph
Janaka-Steph / bitcoin.conf
Created Jun 4, 2018
Bitcoin configuration - Testnet, Raspberry Pi 3
View bitcoin.conf
# Generated by https://jlopp.github.io/bitcoin-core-config-generator/
# This config should be placed in following path (Linux):
# ~/.bitcoin/bitcoin.conf
# Bitcoin Testnet for Raspberry Pi 3
# [core]
# Maintain a full transaction index, used by the getrawtransaction rpc call.
txindex=1
You can’t perform that action at this time.