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
alias: GenAI | |
description: Create some Generative AI Text | |
fields: | |
voice: | |
description: In what voice should our GenAI response with? | |
example: Dumbledore | |
default: A malfunctioning robot | |
message: | |
description: What should we ramble on about? | |
default: Squirrels |
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
golang 1.23.3 |
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
S3_BUCKET=some-aws-s3-bucket-name | |
OUTPUT=$(/usr/local/bin/aws s3 sync --exclude .DS_Store '${Home}/Library/Mobile Documents/com~apple~CloudDocs' s3://${S3_BUCKET}) | |
if [ -z "${OUTPUT}" ]; then | |
echo "No files backed up." | |
echo "Deleting files in _Archive" folders... | |
find '${Home}/Library/Mobile Documents/com~apple~CloudDocs' -path '*/_Archive/*' -type f -not -path "*/.DS_Store" | |
find '${Home}/Library/Mobile Documents/com~apple~CloudDocs' -path '*/_Archive/*' -type f -not -path "*/.DS_Store" -delete | |
else |
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
action=${1} | |
key=${2:-engineering} | |
while read line | |
do | |
case "$action" in | |
"encrypt") | |
b64=$(echo $line | base64) | |
aws kms encrypt --key-id alias/${key} --plaintext $b64 | jq -r '.CiphertextBlob' |
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 events --all-namespaces --sort-by='.metadata.creationTimestamp' |
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 config view --template='{{ range .contexts }}{{ if eq .name "'$(kubectl config current-context)'" }}Current user: {{ printf "%s\n" .context.user }}{{ end }}{{ end }}' |
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
AWS_REGION=${AWS_REGION:-us-east-1} | |
curl --silent -o ~/.bin/ip-ranges.json https://ip-ranges.amazonaws.com/ip-ranges.json | |
jq .createDate ~/.bin/ip-ranges.json | |
jq -r --arg region ${AWS_REGION} '.prefixes[] | select(.region==$region) | .ip_prefix ' ~/.bin/ip-ranges.json > ~/.bin/aws-${AWS_REGION}-ips.txt | |
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
openssl rand -hex 14 | tr -d '\n' | |
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
git rm -r --cached . | |
git add . | |
git status |
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
set -e | |
if [ -z "${1}" ]; then | |
echo "${CTX_ICON} ${CTX_NAME}" | |
exit 0 | |
fi | |
export CTX=${1:-default} | |
CTX_DEFAULT_ICON='☕' |
NewerOlder