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
#@IgnoreInspection BashAddShebang | |
GCLOUD_DIR="$HOME/.config/gcloud" | |
: ${PROJECT_NAME?"Need to set PROJECT_NAME"} | |
if curl metadata.google.internal -i &> /dev/null; then | |
echo "Running on GCE instance. Skipping $PROJECT_NAME setup" | |
else | |
# https://stackoverflow.com/a/28938235/3893740 | |
GREEN='\033[0;32m' |
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
alias glist="gcloud compute instances list | grep -v TERMINATED" | |
alias gssh="gcloud compute ssh --ssh-flag=\"-A\"" | |
function gdel { | |
gcloud compute instances delete $@ | |
} | |
GCLOUD_DIR="$HOME/.config/gcloud" | |
function switch_gcp_project { |