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 | |
# utility to confirm before executing a shell command. | |
# based on https://askubuntu.com/a/22257. | |
me=$(basename "${BASH_SOURCE[0]}") | |
function usage { | |
echo "$me: utility to confirm commands before execution." | |
echo "" |
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 | |
# utility to edit shell commands before execution. | |
tmpdir=$(dirname "$(mktemp -u)")/commands/ | |
mkdir -p "$tmpdir" | |
tmpfile=$(mktemp -p "$tmpdir") | |
if [[ $VISUAL == "" ]]; | |
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 | |
# utility to clean command line history of certain records. | |
me=$(basename "${BASH_SOURCE[0]}") | |
function usage { | |
echo "$me: utility to clean command line history of certain records." | |
echo "" | |
echo "usage: $me REGEX_PATTERN" |
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 | |
access_key_id=$(secret-tool lookup Title aws-access-key-id) | |
secret_access_key=$(secret-tool lookup Title aws-secret-access-key) | |
printf "{ | |
\"Version\": 1, | |
\"AccessKeyId\": \"%s\", | |
\"SecretAccessKey\": \"%s\" | |
}" "$access_key_id" "$secret_access_key" |