Skip to content

Commit

Permalink
Add delete_unused_cloud_run bash alias for Google Cloud Run cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
ashishb committed Oct 10, 2023
1 parent 8643ea8 commit 4b91865
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions bashrc_includes/custom_aliases.bash
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ alias publicip="curl -s http://checkip.dyndns.com/ | sed 's/[^0-9\.]//g'"
alias localip="ipconfig getifaddr en0"
# List all make targets.
alias make_list="make -qp | sed -n -e 's/^\([^.#[:space:]][^:[:space:]]*\): .*/\1/p'"
# Ref: https://serverfault.com/a/1123925/1053189
alias delete_unused_cloud_run="gcloud run revisions list --filter=\"status.conditions.type:Active AND status.conditions.status:'False'\" --format='value(metadata.name)' | xargs -r -L1 gcloud run revisions delete --quiet"

# Usage: kotin_run foo.kt <args-list> to compile foo.kt into foo.kt.jar and run it with the optional <args-list>
ktr () { kotlinc "$1" -include-runtime -d "$1".jar && java -jar "$1".jar "${@:2}"; }
Expand Down

0 comments on commit 4b91865

Please sign in to comment.