Skip to content

Instantly share code, notes, and snippets.

View slawekzachcial's full-sized avatar

Slawek Zachcial slawekzachcial

  • Grenoble, France
View GitHub Profile
@slawekzachcial
slawekzachcial / aws-sigv4-ssm-get-parameter.sh
Last active November 24, 2025 02:55
Using CURL to call AWS ReST API, signing request with v4 signature
#!/bin/bash
# Source: https://docs.aws.amazon.com/general/latest/gr/sigv4-signed-request-examples.html
[[ -n "${AWS_ACCESS_KEY_ID}" ]] || { echo "AWS_ACCESS_KEY_ID required" >&2; exit 1; }
[[ -n "${AWS_SECRET_ACCESS_KEY}" ]] || { echo "AWS_SECRET_ACCESS_KEY required" >&2; exit 1; }
readonly parameterName="SlawekTestParam"
readonly method="POST"
terraform plan -no-color 2>&1 \
| sed -E -e 's/^([[:space:]]+)([-+#])/\2\1/g' -e 's/^([[:space:]]+)~/!\1/g'
@slawekzachcial
slawekzachcial / kubectl-completion-fzf.bash
Last active January 25, 2026 18:22
FZF used to select from multiple possible completions
alias k=kubectl
complete -o default -o bashdefault -F __kubectl_fzf k
__kubectl_fzf() {
# Required to prevent BASH prompt from dissapearing after selecting a completion
# from the FZF list when using "--height" less that 100%.
# "\e[0n" is an ANSI Device Status Report (DSR) sequence that requests the terminal
# to report readiness.
# Binding \e[0n to redraw-current-line ensures the terminal redraws the current