This file contains hidden or 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
// content-extractor.ts | |
import $ from "jquery"; | |
const extractContent = (selector: string, subSelector: string) => { | |
return $(selector) | |
.first() | |
.find(subSelector) | |
.map((_, el) => $(el).text().trim()) | |
.get() |
This file contains hidden or 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
# turn off default logging | |
access_log off; | |
# Create our own format including $server_name | |
log_format main escape=none | |
#'$remote_addr - $remote_user ' | |
'[$time_local] ' | |
'$request $status ' | |
#'"$http_user_agent" ' | |
#'"$http_origin" ' |
This file contains hidden or 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
# full set of options can be found at https://docs.teku.consensys.net/en/latest/Reference/CLI/CLI-Syntax | |
# validators | |
validator-keys: "/root/keystore-m_123.json:/root/keystore-m_123.txt" | |
validators-graffiti: "edzorg" | |
# eth 1 | |
eth1-endpoint: "http://localhost:6666" | |
# use the newest levelDB which uses less space |
This file contains hidden or 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 -eu | |
if [[ $# -eq 0 ]] ; then | |
echo "No argument supplied" | |
exit 1 | |
fi | |
gpgconf --reload gpg-agent # cleans out any failed attempts | |
gpg --decrypt $1 | |
gpgconf --reload gpg-agent # forget the password immediately |
This file contains hidden or 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 -eu | |
if [[ $# -eq 0 ]] ; then | |
echo "No argument supplied" | |
exit 1 | |
fi | |
gpgconf --reload gpg-agent | |
gpg --cipher-algo AES256 --symmetric $1 | |
gpgconf --reload gpg-agent |
This file contains hidden or 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
# Warning: This is a human script that needs to be used interatively. | |
# That said it wouldn't take much to improve it so it could all be done with a single invocation | |
# Download the new version and do a checksum check. Output check is manual | |
TEKU_VERSION="teku-21.2.0.tar.gz"; curl -s https://artifacts.consensys.net/public/teku/raw/names/teku.tar.gz/versions/21.2.0/$TEKU_VERSION -o $TEKU_VERSION && shasum -a 256 -c <<< "27aba84f4ac8678ebd7dea7d2e19790cad7d04b5faf9108ce331c2f8a9e2330f *$TEKU_VERSION" || (echo "Checksum failed deleting file" && rm $TEKU_VERSION); tar -xf $TEKU_VERSION -C /opt | |
# Create a symlink to the newly extracted teku version | |
ln -s /opt/teku-21.2.0/bin/teku /usr/bin/teku-21.2.0 | |
# Edit the service file to point to the new symlink |
This file contains hidden or 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
# For Ubuntu 20.04 install to /etc/systemd/system/teku.service | |
[Unit] | |
Description = eth2 teku service | |
Wants = network-online.target | |
After = network-online.target | |
[Service] | |
User = root | |
Environment ="JAVA_OPTS=-Xmx6g -XshowSettings:vm" |
This file contains hidden or 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
if ARGV[0] != 'plugin' | |
required_plugins = ['vagrant-vbguest', 'vagrant-reload'] | |
plugins_to_install = required_plugins.select { |plugin| not Vagrant.has_plugin? plugin } | |
if not plugins_to_install.empty? | |
puts "Installing plugins: #{plugins_to_install.join(' ')}" | |
if system "vagrant plugin install #{plugins_to_install.join(' ')}" | |
exec "vagrant #{ARGV.join(' ')}" | |
else | |
abort "Installation of one or more plugins has failed. Aborting." | |
end |
This file contains hidden or 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 -eu | |
sudo apt-get update | |
echo "Installing docker" | |
sudo apt-get -y install apt-transport-https | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
sudo apt-key fingerprint 0EBFCD88 | |
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | |
sudo apt-get update |