Skip to content

Instantly share code, notes, and snippets.

@korynewton
korynewton / recreate-pods.sh
Created December 26, 2022 20:49
recreate docker pods if local diverges from remote
#!/usr/bin/env bash
# abort the script if a command returns with a non-zero exit code
set -o errexit
# abort script when accessing an unset variable
set -o nounset
# pipeline command is treated as failed, even if one command in the pipeline fails
set -o pipefail
if [[ "${TRACE-0}" == "1" ]]; then set -o xtrace; fi
@korynewton
korynewton / README.md
Created October 14, 2020 18:10 — forked from ryu1kn/README.md
Getting GCP access token from a service account key JSON file

Getting GCP access token from a service account key

Use your service account's key JSON file to get an access token to call Google APIs.

Good for seeing how things work, including the creation of JWT token.

To create a JWT token, you can replace create-jwt-token.sh script with tools like step.

If you just want to get an access token for a service account,

Keybase proof

I hereby claim:

  • I am korynewton on github.
  • I am korynewton (https://keybase.io/korynewton) on keybase.
  • I have a public key ASDaNw6XtO5vRdrDUGe23L0PhiXtUwd5oMhEM1EH0BXDIgo

To claim this, I am signing this object: