Skip to content

Instantly share code, notes, and snippets.

@mesmacosta
Created August 10, 2019 17:11
Show Gist options
  • Select an option

  • Save mesmacosta/d1898690310a495a5b0a9febe3a8a4be to your computer and use it in GitHub Desktop.

Select an option

Save mesmacosta/d1898690310a495a5b0a9febe3a8a4be to your computer and use it in GitHub Desktop.
gcloud logging write batch-execution "Hello world from $(hostname)."
gcp_zone=$(curl -H Metadata-Flavor:Google http://metadata.google.internal/computeMetadata/v1/instance/zone -s | cut -d/ -f4)
gcloud compute instances delete $(hostname) --zone ${gcp_zone}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment