Skip to content

Instantly share code, notes, and snippets.

View royalgarter's full-sized avatar

Tom (Tung Pham Thanh) royalgarter

View GitHub Profile
@royalgarter
royalgarter / setup-zeromq.sh
Created May 12, 2019 06:38 — forked from katopz/setup-zeromq.sh
Setup zeromq in Ubuntu 16.04
#!/usr/bin/bash
# Download zeromq
# Ref http://zeromq.org/intro:get-the-software
wget https://github.com/zeromq/libzmq/releases/download/v4.2.2/zeromq-4.2.2.tar.gz
# Unpack tarball package
tar xvzf zeromq-4.2.2.tar.gz
# Install dependency

Running a Full Node

Before you begin you'll need to have about 100GB of disk space available to store the Bitcoin blockchain plus additional database information. Both 64bit Mac OS X and GNU/Linux are currently supported. The process of downloading the blocks and indexing can take upwards of 4 hours, depending on Internet connection and other factors. So it's suggested to plan accordingly and let the node syncronize while you're away. It's also possible to use an existing Bitcoin data directory, which will speed up the process.

Step 1: Install Node.js v0.12

It's recommended to install the Node Version Manager, as this makes it simple to switch between different Node.js versions. We will specifically need to install and run v0.12. Please follow the directions at https://github.com/creationix/nvm#install-script and then run:

nvm install v0.12.7
@royalgarter
royalgarter / install-redis.sh
Created December 16, 2018 04:04 — forked from clzola/install-redis.sh
Bash script for installing Redis on Ubuntu 16.04
#!/bin/bash
# Install the Build and Test Dependencies
apt-get update
apt-get install -y curl build-essential tcl
# Download and Extract the Source Code
cd /tmp
curl -O http://download.redis.io/redis-stable.tar.gz
tar xzvf redis-stable.tar.gz
@royalgarter
royalgarter / openvpn-install.sh
Last active September 8, 2018 08:42
OpenVPN Ubuntu
#!/bin/bash
# Guide: https://www.cyberciti.biz/faq/howto-setup-openvpn-server-on-ubuntu-linux-14-04-or-16-04-lts/
# https://github.com/Nyr/openvpn-install
# Install: wget <link-to-this-sh-file> -O openvpn-install.sh
# Download config file to local: scp [email protected]:~/<server-file>.ovpn <local-file>.ovpn
# Copyright (c) 2013 Nyr. Released under the MIT License.
# Detect Debian users running the script with "sh" instead of bash
if readlink /proc/$$/exe | grep -q "dash"; then
@royalgarter
royalgarter / update-dokku-stack.sh
Created June 12, 2018 03:46 — forked from egerlach/update-dokku-stack.sh
Update stack underlying apps running on dokku
#!/bin/bash
# before you can use this, you need to run (as root):
# git clone https://github.com/tt/stack-images.git /root/stack-images
# git clone https://github.com/gliderlabs/herokuish.git /root/herokuish
# First, we need to get our base ubuntu images up to date
docker pull ubuntu-debootstrap:14.04
docker pull ubuntu:trusty # for postgresql
@royalgarter
royalgarter / setup_btc_prune_node_ubuntu18_do.sh
Last active September 13, 2021 02:38
Setup Bitcoin Prune Node & LND on DigitalOcean Ubuntu 18.04 LTS
#!/bin/bash
# Prerequisites:
# 1/ ZeroMQ (for LN): https://gist.github.com/royalgarter/71abc75e1214bb39a1ef14a64639c17d
# Test after install bitcoin: btc getzmqnotifications
echo "########### This script was tested with DigitalOcean Ubuntu 18.04 LTS"
echo "########### The server will reboot when the script is complete"
echo "########### Changing to home dir"
cd ~
@royalgarter
royalgarter / Verifying my Blockstack ID
Created January 11, 2018 02:46
Verifying my Blockstack ID
Verifying my Blockstack ID is secured with the address 1Doa8tLD9kjK6JwdHkaHjHPQVSShFsSVQP https://explorer.blockstack.org/address/1Doa8tLD9kjK6JwdHkaHjHPQVSShFsSVQP
@royalgarter
royalgarter / node_prune.sh
Created November 24, 2017 02:32 — forked from gpittarelli/node_prune.sh
Prunes very-likely-uneeded files from node_modules directories
#!/usr/bin/env bash
# Port of https://github.com/tj/node-prune to bash
# Also,
# - fixed "*.ts" being overzealous and killing .d.ts files
# - added some more file types from https://github.com/npm/npm/issues/5264#issuecomment-259800486
#
# See also:
# - https://github.com/timoxley/cruft
# - https://yarnpkg.com/en/docs/cli/autoclean
# - https://github.com/ModClean/modclean
Verifying my Blockstack ID is secured with the address 19uA5bcrHLwaQcDAJowkXATaiujwaxrABw https://explorer.blockstack.org/address/19uA5bcrHLwaQcDAJowkXATaiujwaxrABw
@royalgarter
royalgarter / storj.sh
Created November 16, 2017 10:12
Storj Setup for Ubuntu
apt-get update
apt install git python build-essential --fix-missing
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.6/install.sh | bash
nvm install 6.11
nvm use 6.11
npm config set unsafe-perm true
npm install --global storjshare-daemon
mkdir storj