Skip to content

Instantly share code, notes, and snippets.

@kborovik
Last active January 4, 2022 00:33
Show Gist options
  • Save kborovik/0dc6992f17a4ffd220e7c886a4598e74 to your computer and use it in GitHub Desktop.
Save kborovik/0dc6992f17a4ffd220e7c886a4598e74 to your computer and use it in GitHub Desktop.
.bashrc functions
gcp-show-cloudbuild-us_central1() {
local build_id
gcloud builds list --region=us-central1 --limit=3
build_id=$(gcloud builds list --region=us-central1 --limit=1 --format="value(id)")
gcloud builds log --region=us-central1 --stream "${build_id}"
}
gcp-show-cloudbuild-global() {
local build_id
gcloud builds list --limit=3
build_id=$(gcloud builds list --limit=1 --format="value(id)")
gcloud builds log --stream "${build_id:?}"
}
gcp-list-compute-instances() {
gcloud compute instances list --sort-by=name
}
ssl-show-server-crt() {
if [ -z "$1" ]; then
echo -e "Usage: ${FUNCNAME[0]} <server_name:server_port>"
return 1
fi
openssl s_client -connect "$1" | openssl x509 -noout -text
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment