Skip to content

Instantly share code, notes, and snippets.

View peterrosell's full-sized avatar

Peter Rosell peterrosell

  • Pagero
  • Gothenburg, Sweden
View GitHub Profile
#!/bin/bash
set -euo pipefail
IMAGES=$(kubectl get pods --all-namespaces -o json | jq -r '.items[].spec.containers[].image' | sort |uniq)
SYFT_BIN="podman run -v ${PWD}:/workdir -w /workdir docker.io/anchore/syft:latest"
GRYPE_BIN="podman run -v ${PWD}:/workdir -w /workdir docker.io/anchore/grype:latest"
for IMAGE in ${IMAGES}; do
@peterrosell
peterrosell / gsmkdirs.sh
Created July 2, 2019 08:55 — forked from xmedeko/gsmkdirs.sh
Google Cloud Bucket: create explicit dirs
#!/bin/bash
##
## Creates explicit dirs on the bucket
##
function print_help() {
echo "Usage:" $(basename $0) bucket_mounted_dir
exit 1
}
@peterrosell
peterrosell / install-goconvey-handler.sh
Last active March 26, 2018 09:23
Register a schema handler to open links from GoConvey in Visual Studio Code. Works at least for Ubuntu 16.04.
#!/usr/bin/env bash
cat <<EOF-HANDLER > /usr/bin/goconvey-handler
#!/usr/bin/env bash
request="\${1#*://}" # Remove schema from url (goconvey://)
request="\${request#*?url=}" # Remove open?url=
request="\${request#*://}" # Remove file://
request="\${request//%2F//}" # Replace %2F with /
request="\${request/&line=/:}" # Replace &line= with :