It's on the public web. Anyone can get access to the private key. Do not use this for anything.
...I'm just testing stuff and it's an easy little hack.
| #!/usr/bin/env bash | |
| set -Eeuo pipefail | |
| primary-line() { ip -o route show default | awk '{m=0;for(i=1;i<=NF;i++)if($i=="metric")m=$(i+1);print m"\t"$0}' | sort -n | head -1 | cut -f2-; } | |
| primary-iface() { primary-line | grep -oP 'dev \K\S+'; } | |
| default-gateway() { primary-line | grep -oP 'via \K\S+'; } | |
| iface-subnet() { ip -o -4 route show dev "$1" scope link proto kernel | awk '{print $1; exit}'; } | |
| primary-subnet() { iface-subnet "$(primary-iface)"; } | |
| secondary-ifaces() { |
| #!/usr/bin/env bash | |
| for test in "bare file" "directory"; do | |
| prefix="" | |
| container_path="/foo" | |
| if [ "$test" = "directory" ]; then | |
| mkdir -p "/tmp/foodir" | |
| prefix="/foodir" | |
| container_path="/foodir" | |
| fi |
| #!/usr/bin/env bash | |
| x=$(mktemp --suffix=.py) | |
| curl -L https://github.com/9001/copyparty/releases/latest/download/copyparty-sfx.py -o "$x" | |
| python "$x" | |
| rm -i "$x" |
| #!/bin/sh | |
| set -eu | |
| # DEBUG=true | |
| DEBUG=false | |
| if $DEBUG; then | |
| trap 'echo "# $BASH_COMMAND";read' DEBUG | |
| fi |
| #!/usr/bin/env bash | |
| sudo kill -SIGQUIT $(systemctl show gitlab-runner.service -p MainPID | cut -d= -f2) && \ | |
| while systemctl is-active gitlab-runner.service ; do sleep 2; done |
| #!/bin/sh | |
| set -eu | |
| tmp_file=$(mktemp) && echo -e '#!/bin/sh\nexit 0' > "$tmp_file" && chmod +x "$tmp_file" && "$tmp_file" || tmp_file=$(mktemp -p "$HOME") || exit 1 | |
| gists=$(curl -s https://api.github.com/users/VSharapov/gists | jq -r '.[].files[].raw_url') | |
| [ -z "$gists" ] && exit 1 | |
| selected_gist=$(echo "$gists" | fzf) || select selected_gist in $gists; do break; done | |
| curl -s "$selected_gist" -o "$tmp_file" && chmod +x "$tmp_file" && "$tmp_file" "@" | |
| rm -i "$tmp_file" |
| #!/usr/bin/env bash | |
| sudo systemd-inhibit --what=handle-lid-switch --mode=block sleep 9999d & disown |
| #!/usr/bin/env bash | |
| echo "$USER ALL=(ALL) NOPASSWD:ALL" | sudo tee /etc/sudoers.d/$USER > /dev/null |
| #!/usr/bin/env bash | |
| ### recommended usage is something like: | |
| ### export PARAM_SUBNETS="10.69.0.0/16 192.168.1.0/24"; export PARAM_USERNAME=ubuntu; [ -z "$PARAM_PASSWORD" ] && { read -s ; export PARAM_PASSWORD="$REPLY" ; } ; ./listAccessibleMachines.sh | |
| set -Eeuo pipefail | |
| trap cleanup SIGINT SIGTERM ERR EXIT | |
| script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P) |