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
# ============== | |
# DISK SELECTION | |
# ============== | |
set --local devices (lsblk --list --nodeps --noheadings --output=name,type | awk '$2 == "disk" {print $1}') | |
if not set -q disk | |
echo 'DISK DEVICES AVALIABLE:' $devices | |
read --local --prompt-str='Which device to install on? ' disk | |
end |
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 | |
set -o errexit | |
set -o pipefail | |
set -o nounset | |
if [ "$EUID" = 0 ]; then echo "DO NOT RUN THIS AS ROOT!" >&2 && exit 1; fi | |
# GLOBAL PARAMETERS | |
user='luizberti' # sometimes used when $USER would yield incorrect results |
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 | |
set -o errexit | |
set -o pipefail | |
command -v ufw &> /dev/null || { echo you need to install ufw; exit 1; } | |
command -v wg &> /dev/null || { echo you need to install wg; exit 1; } | |
command -v wg-quick &> /dev/null || { echo you need to install wg-quick; exit 1; } | |
command -v systemctl &> /dev/null || { echo you need systemd to use $0; exit 1; } | |
modprobe wireguard # checks if kernel module is present |
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
""" | |
https://tools.ietf.org/rfc/rfc4226.txt <= this is implemented | |
https://tools.ietf.org/rfc/rfc6238.txt <= this is not (yet) | |
""" | |
from base64 import b32decode | |
from hashlib import sha1 | |
from hmac import new | |
from time import time |
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 | |
echo -e "\033[0mNC (No color)" | |
echo -e "\033[1;37mWHITE\t\033[0;30mBLACK" | |
echo -e "\033[0;34mBLUE\t\033[1;34mLIGHT_BLUE" | |
echo -e "\033[0;32mGREEN\t\033[1;32mLIGHT_GREEN" | |
echo -e "\033[0;36mCYAN\t\033[1;36mLIGHT_CYAN" | |
echo -e "\033[0;31mRED\t\033[1;31mLIGHT_RED" | |
echo -e "\033[0;35mPURPLE\t\033[1;35mLIGHT_PURPLE" |