This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -euo pipefail | |
shopt -s inherit_errexit 2>/dev/null || true | |
prefix=${prefix:-} | |
operation=${operation:-=} | |
while true; do | |
kubectl get node -L node.kubernetes.io/instance-type,eks.amazonaws.com/nodegroup,karpenter.sh/provisioner-name | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
FILE="$1" | |
if [[ -z $FILE ]]; then | |
echo "$0 run-XXX.mocks.tar.gz" | |
exit 1 | |
fi | |
if command -v colordiff >/dev/null; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
## ssm | |
## | |
## Copyright (c) 2023 Piotr Roszatycki <[email protected]>, MIT | |
set -e | |
if ! command -v aws >/dev/null; then | |
echo "Needs aws command." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
## gitlab_clone_all.sh | |
## | |
## Copyright (c) 2023 Piotr Roszatycki <[email protected]>, MIT | |
## | |
## Requires curl and jq | |
GROUP_NAME="$1" | |
shift |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ -z "$1" ]; then | |
gcloud compute images list --project $PROJECT | |
else | |
gcloud compute images export --project $PROJECT \ | |
--async \ | |
--image "$1" \ | |
--destination-uri "gs://$BUCKET/$1.vmdk" \ | |
--export-format=vmdk \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git filter-branch --index-filter "cp $PWD/.gitattributes . && git add .gitattributes" --tag-name-filter cat --prune-empty -- --all |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
## The fake API service for OpenVPN that allows to use client with simple setup mode. | |
use Mojo::File; | |
use Mojo::Util 'xml_escape'; | |
use Mojolicious::Lite; | |
post '/RPC2' => sub { | |
my ($c) = @_; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Global Docker image parameters | |
## Please, note that this will override the image parameters, including dependencies, configured to use the global value | |
## Current available global Docker image parameters: imageRegistry and imagePullSecrets | |
## | |
global: | |
# imageRegistry: myRegistryName | |
# imagePullSecrets: | |
# - myRegistryKeySecretName | |
# storageClass: myStorageClass | |
labels: {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kubectl get pod -o wide | perl -pe 's/\b (?! )\b/_/g' | q -H 'select node, count(*) from - group by node' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias k='kubectl' | |
alias kd='kubectl describe' | |
alias kdd='kubectl describe deployment' | |
alias kddn='kubectl describe deployment --namespace' | |
alias kdp='kubectl describe pod' | |
alias kdpn='kubectl describe pod --namespace' | |
alias kds='kubectl describe secret' | |
alias kdsn='kubectl describe secret --namespace' | |
alias kdsv='kubectl describe service' | |
alias kdsva='kubectl describe service --all-namespaces' |
NewerOlder