Last active
September 13, 2018 17:44
-
-
Save marek-saji/b33f60e043d321aa702ed123eb1da27f to your computer and use it in GitHub Desktop.
This file contains hidden or 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
EMOJI_JSON="$( curl -s https://raw.githubusercontent.com/iamcal/emoji-data/master/emoji.json )" | |
RANDOM_EMOJI_DATA="$( | |
echo "${EMOJI_JSON}" | | |
jq -r '.[] | (.unified + "\t" + .short_name )' | | |
sort -R --random-source=<( for I in $( seq 1 1000 ); do echo "$SEED$I" | sha1sum; done ) | | |
head -n1 | | |
sed -r 's/^|-/\\U/g' | |
)" | |
RANDOM_EMOJI="$( echo -e "${RANDOM_EMOJI_DATA}" | cut -f1 )" | |
RANDOM_EMOJI_NAME="$( echo -e "${RANDOM_EMOJI_DATA}" | cut -f2 )" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment