This file contains hidden or 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 | |
# Check if the required argument (prefix) is passed | |
if [ -z "$1" ]; then | |
echo "Usage: $0 <prefix>" | |
exit 1 | |
fi | |
PREFIX=$1 |
This file contains hidden or 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
Host i-* mi-* | |
User root | |
ProxyCommand sh -c "instance=\$(echo %h | cut -d. -f1); profile=\$(echo %h | cut -d. -f2); profile=\${profile:-\$AWS_PROFILE}; region=\$(echo %h | cut -d. -f3); region=\${region:-\${AWS_REGION:-\$(aws configure get region --profile \${profile:-\$AWS_PROFILE})}}; aws ec2-instance-connect send-ssh-public-key --profile \${profile} --region \${region} --instance-id \${instance} --instance-os-user %r --ssh-public-key file://\${HOME}/.ssh/id_rsa.pub; aws ssm start-session --profile \${profile} --region \${region} --target \${instance} --document-name AWS-StartSSHSession --parameters 'portNumber=%p'" | |
ServerAliveInterval 60 |
This file contains hidden or 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 | |
_list=($(kubectl get --raw / |grep "^ \"/api"|sed 's/[",]//g')); | |
echo -e "GROUP\011RESOURCE" | |
for _api in ${_list[@]}; do | |
_aruyo=$(kubectl get --raw ${_api} | jq .resources); | |
if [ "x${_aruyo}" != "xnull" ]; then | |
kubectl get --raw ${_api} | jq -r ".resources[].name" | xargs -n1 echo ${_api} | tr ' ' '\011' | sort |
This file contains hidden or 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
{ | |
"description": "Mac OSX: Use Function Keys in Supported Apps, else use Media Keys", | |
"manipulators": [ | |
{ | |
"conditions": [ | |
{ | |
"bundle_identifiers": [ | |
"^com\\.microsoft\\.VSCode$", | |
"^com\\.microsoft\\.VSCodeInsiders", | |
"^com\\.jetbrains\\.goland$", |
This file contains hidden or 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 pods --all-namespaces -o jsonpath="{range .items[?(@.spec.runtimeClassName)]}-n {.metadata.namespace} {.metadata.name}{'\n'}{end}" | xargs -n3 echo kubectl delete pod --wait=false | bash |
This file contains hidden or 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 -eu | |
set -o pipefail | |
shopt -s inherit_errexit | |
if [[ $# -lt 4 ]]; then | |
echo "Usage: $0 aws_profile_from aws_region_from aws_profile_to aws_region_to [shell patterns]" | |
exit 99 | |
fi |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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,2025 Piotr Roszatycki <[email protected]>, MIT | |
## | |
## Requires curl and jq | |
GROUP_NAME="$1" | |
shift |
NewerOlder