Skip to content

Instantly share code, notes, and snippets.

@sl-he
sl-he / README.md
Created November 6, 2023 22:12 — forked from strfry/README.md
Deploys FreeBSD on a Hetzner cloud server

Deploys FreeBSD on a Hetzner cloud server

Prerequisites:

  • A Hetzner Cloud API Token (Pass in via APIKEY)
  • jq
  • sshpass

Usage

Replace server_id variable with your hetzner server Id
@sl-he
sl-he / solana_withdrawal.sh
Last active February 11, 2021 10:37
solana_withdrawal.sh
#!/bin/bash
BIN_FILE="/root/.local/share/solana/install/active_release/bin/solana"
MIN_BALANCE=65
WALLET="CXUGSygKbaiatbGxCpJ1XxaBbuuYFeXZVQkHgUs1E3b1"
$BIN_FILE withdraw-from-vote-account ~/solana/vote-account-keypair.json ~/solana/validator-keypair.json ALL --authorized-withdrawer ~/solana/vote-account-keypair.json --url http://127.0.0.1:8899
VOTE_BALANCE=$($BIN_FILE balance -k ~/solana/vote-account-keypair.json | awk '{print $1}')
echo -e "Vote Balance: $VOTE_BALANCE"
BALANCE=$($BIN_FILE balance -k ~/solana/validator-keypair.json | awk '{print $1}')
echo -e "Identity Balance: $BALANCE"
REWARD=$(echo "$BALANCE-$MIN_BALANCE" | bc)
#!/bin/bash
set -e
vote_account="/root/solana/vote-account-keypair.json"
identity_account="/root/solana/validator-identity.json"
new_stake="/root/solana/validator-stake-keypair-$(printf '%(%Y-%m-%d)T').json"
min_withdraw=100
available_for_withdraw=$(solana balance $vote_account | awk -F\. '{print $1}')
re='^[0-9]+$'
if ! [[ $available_for_withdraw =~ $re ]] ; then
@sl-he
sl-he / parity_on_hetzner.md
Created May 21, 2020 10:56 — forked from suenot/parity_on_hetzner.md
parity on hetzner

Block reserved IPS:

iptables -A OUTPUT -p tcp -s 0/0 -d 0.0.0.0/8 -j DROP
iptables -A OUTPUT -p tcp -s 0/0 -d 10.0.0.0/8 -j DROP
iptables -A OUTPUT -p tcp -s 0/0 -d 100.64.0.0/10 -j DROP
iptables -A OUTPUT -p tcp -s 0/0 -d 169.254.0.0/16 -j DROP
iptables -A OUTPUT -p tcp -s 0/0 -d 172.16.0.0/12 -j DROP
iptables -A OUTPUT -p tcp -s 0/0 -d 192.0.0.0/24 -j DROP
iptables -A OUTPUT -p tcp -s 0/0 -d 192.0.2.0/24 -j DROP
#!/bin/bash
# Using:
# cosmos.sh PASS VALIDATOR DELEGATOR WALLET_NAME NETWORK_NAME COIN DENOMINATION
CLI="/root/go/bin/kvcli"
wallet_pass=$1
validator=$2
delegator=$3
wallet_name=$4
network=$5
coin=$6
### Keybase proof
I hereby claim:
* I am sl-he on github.
* I am ractolechoc5 (https://keybase.io/ractolechoc5) on keybase.
* I have a public key ASCIQR1I8WtV71E716tbeb1MTfWrmF8GXYpJ-FbWzffgswo
To claim this, I am signing this object: