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
| #!/usr/bin/env bash | |
| # run as: ./labels.sh path/to/source/repository path/to/target/repository | |
| # first check if this is sufficient: gh label clone owner/source-repo | |
| # make sure you won't miss the info of issues and PRs attached to the labels the script will delete | |
| PS4='\033[31m$0:$LINENO: \033[0m' | |
| set -eEo pipefail | |
| test $# -eq 2 |
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 | |
| # Force outbound traffic through the attached floating IP | |
| NET_INT="eth0" | |
| CURL_TIMEOUT=3 | |
| echo -n "Setting floating IP as the default gateway: " | |
| # Check there's a floating IP attached to this droplet | |
| if [ "$(curl -s --connect-timeout $CURL_TIMEOUT http://169.254.169.254/metadata/v1/floating_ip/ipv4/active)" != "true" ]; then |