Skip to content

Instantly share code, notes, and snippets.

@SuperSandro2000
Created February 18, 2021 11:18
Show Gist options
  • Save SuperSandro2000/e9947352a3b57967aab4bc4debe4ec7a to your computer and use it in GitHub Desktop.
Save SuperSandro2000/e9947352a3b57967aab4bc4debe4ec7a to your computer and use it in GitHub Desktop.
#!/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