Skip to content

Instantly share code, notes, and snippets.

View Stadicus's full-sized avatar

Stadicus Stadicus

View GitHub Profile
Verifying my Blockstack ID is secured with the address 1CBMJVVKkDtvLBdt5ASM3mS6fEC47R8bjK https://explorer.blockstack.org/address/1CBMJVVKkDtvLBdt5ASM3mS6fEC47R8bjK
@Stadicus
Stadicus / eclair.service
Last active January 21, 2018 15:40
systemd eclair.service for Medium article
[Unit]
Description=Eclair Lightning Node
Requires=bitcoind.service
After=bitcoind.service
[Service]
ExecStart=/usr/bin/java -jar /home/bitcoin/eclair/eclair-node.jar
Restart=always
RestartSec=60
User=bitcoin
#!/bin/bash
# update electrumx banner to report bitcoin memory pool, fees, height and time since last block
# activate with cron job similar to this
#*/2 * * * * ~/bin/update-electrumx-banner
# specify your bitcoin-cli location
BITCOIN_CLI=/usr/local/bin/bitcoin-cli
# specify your bitcoin data directory
@Stadicus
Stadicus / lightningd.service
Last active February 11, 2018 22:15
systemd for c-lightning daemon
[Unit]
Description=C-Lightning daemon
Requires=bitcoind.service
Requires=getpublicip.service
After=bitcoind.service
[Service]
# get var PUBIP from file
EnvironmentFile=/home/bitcoin/publicip/publicip
@Stadicus
Stadicus / getpublicip.service
Last active February 12, 2018 22:50
systemd for getpubip.sh
[Unit]
Description=getpublicip.sh: get public ip address from ipinfo.io
After=network.target
[Service]
User=root
Group=root
Type=simple
ExecStart=/usr/local/bin/getpublicip.sh
Restart=always
@Stadicus
Stadicus / getpublicip.sh
Last active February 12, 2018 22:55
Write public ip address into file every 5 minutes
#!/bin/bash
# getpublicip.sh
echo 'getpublicip.sh started, writing public IP address every 10 minutes into /run/publicip'
while [ 0 ];
do
printf "PUBLICIP=$(curl -vv ipinfo.io/ip 2> /run/publicip.log)\n" > /run/publicip;
sleep 600
done;
@Stadicus
Stadicus / 20-raspberry-bitcoin
Last active February 23, 2018 21:35
bash welcome script for RaspiBolt
#!/bin/sh
# original script by Damian Mee https://github.com/meeDamian
# copy script to /etc/update-motd.d/
# set colors
color_red='\033[0;31m'
color_green='\033[0;32m'
color_yellow='\033[0;33m'
color_gray='\033[0;37m'
color_darkgray='\033[1;30m'
@Stadicus
Stadicus / .bashrc
Last active February 25, 2018 10:14
Pimp your bitcoin prompt
# enable color prompt (uncomment)
force_color_prompt=yes
# pimp prompt (replace the PS1 line), use only one yellow OR red, not both.
# yellow user
PS1="${debian_chroot:+($debian_chroot)}\[\e[33m\]\u \[\033[01;34m\]\w\[\e[33;40m\] ฿\[\e[m\] "
# red user
PS1="${debian_chroot:+($debian_chroot)}\[\e[31m\]\u \[\033[01;34m\]\w\[\e[33;40m\] ฿\[\e[m\] "
# set "ls" to always use the -la option
@Stadicus
Stadicus / torrc
Last active March 8, 2018 08:30
Thundroid: Tor configuration
RunAsDaemon 1
PortForwarding 1
ControlPort 9051
CookieAuthentication 1
CookieAuthFileGroupReadable 1
MaxMemInQueues 256MB
Log notice file /var/log/tor/notices.log
@Stadicus
Stadicus / bitcoin.conf
Last active March 8, 2018 08:31
Thundroid testnet: bitcoin.conf for Bitcoin Node with Lightning
# Example bitcoin.conf for Thundroid
server=1
daemon=1
testnet=1
txindex=1
# Connection settings
#externalip=111.222.333.444 # to announce fixed ip
#port=12345 # for non-standard port
rpcuser=bitcoin