This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Run: "chmod u+x obsetup.sh" before running the script | |
user=$(whoami) | |
dir=$(pwd) | |
if [ $user = 'root' ]; then | |
echo "Please run this script as a regular user." | |
exit; | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Run via cron | |
# */5 * * * * sh /home/pi/bin/ob2start.sh >/dev/null 2>&1 | |
PID="$(ps aux | grep -i openbazaard.go | grep -v grep | awk {'print $2'})" | |
if [ -z "$PID" ]; then | |
go run $GOPATH/src/github.com/OpenBazaar/openbazaar-go/openbazaard.go start | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# file names & paths | |
tmp="/tmp" # destination folder to store the final iso file | |
hostname="ubuntu" | |
currentuser="$( whoami)" | |
# define spinner function for slow tasks | |
# courtesy of http://fitnr.com/showing-a-bash-spinner.html | |
spinner() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String.prototype.lpad = function(padString, length) { | |
var str = this; | |
while (str.length < length) | |
str = padString + str; | |
return str; | |
} | |
var blockHeight = 434695, | |
rawTx = '<raw transaction>', | |
blockLittleEndian = (blockHeight).toString(16).lpad('0', 8).match(/../g).reverse().join(''); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Verifying my Blockstack ID is secured with the address 143u5qs8w6FM13Av93ZGpzcUKWsfDah1sX https://explorer.blockstack.org/address/143u5qs8w6FM13Av93ZGpzcUKWsfDah1sX |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Save as /lib/systemd/system/openbazaar.service | |
[Unit] | |
Description=OpenBazaar server | |
After=network.target auditd.service | |
[Service] | |
Type=forking | |
User=pi | |
Group=pi | |
PIDFile=/tmp/openbazaard.pid |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DAEMON_URL = http://<bitcoin.conf rpcuser>:<bitcoin.conf rpcpassowrd>@localhost:8332/ | |
DB_DIRECTORY = /Users/bitcoin/.electrumx/ | |
DB_ENGINE = leveldb | |
USERNAME = bitcoin | |
ELECTRUMX = /Users/bitcoin/source/electrumx/electrumx_server | |
HOST = 0.0.0.0 | |
ANON_LOGS = fuck off :) | |
BANNER_FILE = /Users/bitcoin/.electrumx/banner.txt | |
DONATION_ADDRESS = 34ie35p4G1npt6GoXR9BDhmMndNwCsiiEr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Grin node | |
After=network.target | |
[Service] | |
WorkingDirectory=/home/satoshi/.grin/ | |
User=satoshi | |
Group=satoshi | |
PrivateDevices=yes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
jq --help >/dev/null 2>&1 || { echo >&2 "Error: 'jq' is required but not installed."; exit 1; } | |
LIST=$(lncli listchannels | jq -r '.[]') | |
LENGTH=$(echo $LIST | jq 'length') | |
for (( i=0; i<$LENGTH; i++ )); | |
do | |
NODE_PUBKEY=$(echo $LIST | jq ".[$i].remote_pubkey" | tr -d '"') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=ZTE SMS Forwarder timer | |
[Timer] | |
OnBootSec=10 | |
OnUnitActiveSec=10 | |
Unit=zte-sms-forwarder.service | |
[Install] | |
WantedBy=timers.target |