Skip to content

Instantly share code, notes, and snippets.

@franky47
Created September 20, 2017 04:54
Show Gist options
  • Save franky47/49dd0361194343aa9e6e80fa5f97bd2c to your computer and use it in GitHub Desktop.
Save franky47/49dd0361194343aa9e6e80fa5f97bd2c to your computer and use it in GitHub Desktop.
Get a robotic avatar of your environment variables setup
#!/usr/bin/env bash
# This simple line lists your environment variables,
# hashes them into a SHA-1 and uses that to query a "unique"
# robotic avatar from robohash.org.
#
# This lets you see quickly if something is out of place in
# a server configuration, as any slight change of the config
# will result in a totally different image, which is easier
# to catch at a glimpse than remembering checksums.
# On macOS:
echo "https://robohash.org/$(printenv | shasum | base64).png"
# On *nix:
echo "https://robohash.org/$(printenv | sha1sum | base64).png"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment