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 name | |
readonly PROGNAME=$(basename $0) | |
# File name, without the extension | |
readonly PROGBASENAME=${PROGNAME%.*} | |
# File directory | |
readonly PROGDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) | |
# Arguments | |
readonly ARGS="$@" |
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 | |
set -e | |
# zsh will not install without ncurses. If the machine doesn't have this library, it will need to be installed first. | |
export CXXFLAGS=" -fPIC" CFLAGS=" -fPIC" CPPFLAGS="-I${HOME}/include" LDFLAGS="-L${HOME}/lib" | |
wget https://ftp.gnu.org/pub/gnu/ncurses/ncurses-6.2.tar.gz | |
tar -xzvf ncurses-6.2.tar.gz | |
cd ncurses-6.2 | |
./configure --prefix=$HOME --enable-shared |
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 | |
swappoff -a | |
echo "yes" | parted /dev/nvme0n1 rm 4 | |
echo "yes" | parted /dev/nvme0n1 rm 3 | |
echo "yes" | parted /dev/nvme1n1 rm 4 | |
echo "yes" | parted /dev/nvme1n1 rm 3 |
The set
lines
- These lines deliberately cause your script to fail. Wait, what? Believe me, this is a good thing.
- With these settings, certain common errors will cause the script to immediately fail, explicitly and loudly. Otherwise, you can get hidden bugs that are discovered only when they blow up in production.
set -euxo pipefail
is short for:
set -e
set -u
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
def $TRUSTED = ( | |
); | |
domain (ip) { | |
table filter { | |
chain INPUT { | |
policy DROP; | |
# connection tracking | |
mod state state INVALID DROP; | |
mod state state (ESTABLISHED RELATED) ACCEPT; |
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
// Switch current database to "history" | |
db = db.getSiblingDB('history'); | |
// The mark for cutting initial output off | |
print("CUT_TO_HERE"); | |
rs.slaveOk(); | |
// Main output | |
// "toArray()" method allows to get all records | |
printjson( db.getCollection('LastWeekRates').find({coin: {$in:["AE", "ADA", "ARK", "BCD", "BCH", "BNB", "BSV", "BTC", "BTG", "DCR", "DGB", "EOS", "ETC", "ETH", "GAS", "GRS", "ICX", "KIN", "LTC", "NEO", "ONG", "ONT", "RVN", "TRX", "BTT","TRX-USDT", "WIN", "JST", "XLM", "XRP"]}, fiat: 'USD'}).toArray()); |
This document describes how to setup a Tezos node and delegate baking rights to it. It involves configuring two instances:
- Node: Public vps instance that interacts with the tezos network and runs
tezos-node
,tezos-baker
,tezos-endorser
andtezos-accuser
. - Signer: Private instance on your home network that contains the baker keys and authorizes baking requests via
tezos-signer
.
This guide assumes you have already created two instances running Ubuntu 18.04.
NewerOlder