Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p ripgrep
#!/usr/bin/env bash
# vim: set filetype=bash:
set -eou pipefail
if [[ $# != 1 ]]; then
echo "Usage: $0 038342z429cavdp2q3mjczlprw83nca030mjlipjppr43bzg9db0"
exit 0
fi
hash="$1"
for type in to-base16 to-base32 to-base64 to-sri; do
search+="-e \"$(nix "$type" --type sha256 "$hash")\" "
done
rg "$search"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment