Created
June 21, 2024 12:37
-
-
Save ephrin/d58745b6279a3ae40e963e8d123fa126 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
#!/bin/bash | |
adjectives=( | |
"admiring" "adoring" "affectionate" "agitated" "amazing" "angry" "awesome" | |
"blissful" "boring" "brave" "clever" "cocky" "compassionate" "competent" | |
"condescending" "confident" "cranky" "dazzling" "determined" "distracted" | |
"dreamy" "eager" "ecstatic" "elastic" "elated" "elegant" "eloquent" "epic" | |
"fervent" "festive" "flamboyant" "focused" "friendly" "frosty" "gallant" | |
"gifted" "goofy" "gracious" "happy" "hardcore" "heuristic" "hopeful" | |
"hungry" "infallible" "inspiring" "interesting" "intelligent" "jovial" | |
"keen" "kind" "laughing" "loving" "lucid" "mystifying" "modest" "musing" | |
"naughty" "nervous" "nifty" "nostalgic" "objective" "optimistic" "peaceful" | |
"pedantic" "pensive" "practical" "priceless" "quirky" "quizzical" "relaxed" | |
"reverent" "romantic" "sad" "serene" "sharp" "silly" "sleepy" "stoic" | |
"strange" "stupefied" "suspicious" "tender" "thirsty" "trusting" "unruffled" | |
"upbeat" "vibrant" "vigilant" "vigorous" "wizardly" "wonderful" "xenodochial" | |
"youthful" "zealous" "zen" | |
) | |
surnames=( | |
"albattani" "allen" "almeida" "agnesi" "archimedes" "ardinghelli" "aryabhata" | |
"austin" "babbage" "banach" "banzai" "bardeen" "bartik" "bassi" "beaver" | |
"bell" "benz" "bhabha" "bhaskara" "black" "blackburn" "blackwell" "bohr" | |
"booth" "borg" "bose" "boyd" "brahmagupta" "brattain" "brown" "buck" | |
"burnell" "cannon" "carson" "cartwright" "cerf" "chandrasekhar" "chaplygin" | |
"chatelet" "chatterjee" "chebyshev" "colden" "cori" "cray" "curie" "darwin" | |
"davinci" "dewdney" "dhawan" "diffie" "dijkstra" "dirac" "driscoll" "dubinsky" | |
"easley" "edison" "einstein" "elbakyan" "elgamal" "elion" "engelbart" | |
"euclid" "euler" "faraday" "feistel" "fermat" "fermi" "feynman" "franklin" | |
"galileo" "galois" "ganguly" "gates" "gauss" "germain" "goldberg" "goldstine" | |
"goldwasser" "golick" "goodall" "gould" "greider" "grothendieck" "haibt" | |
"hamilton" "haslett" "hawking" "hellman" "heisenberg" "hermann" "herschel" | |
"hertz" "heyrovsky" "hodgkin" "hofstadter" "hoover" "hopper" "hugle" | |
"hypatia" "ishizaka" "jackson" "jang" "jennings" "jepsen" "johnson" "joliot" | |
"jones" "kalam" "kapitsa" "kare" "keldysh" "keller" "kepler" "khayyam" | |
"khorana" "kilby" "kirch" "knuth" "kowalevski" "lalande" "lamarr" "lamport" | |
"leakey" "leavitt" "lederberg" "lehmann" "lewin" "lichterman" "liskov" | |
"lovelace" "lumiere" "mahavira" "mayer" "mccarthy" "mcclintock" "mclean" | |
"mcnulty" "meitner" "meninsky" "mestorf" "minsky" "mirzakhani" "morse" | |
"murdock" "neumann" "newton" "nightingale" "nobel" "noether" "northcutt" | |
"noyce" "panini" "pare" "pascal" "pasteur" "payne" "perlman" "pike" "poincare" | |
"poitras" "ptolemy" "raman" "ramanujan" "ride" "montalcini" "ritchie" | |
"roentgen" "rosalind" "saha" "sammet" "shaw" "shirley" "shockley" "sinoussi" | |
"snyder" "spence" "stallman" "stone" "swanson" "swartz" "swirles" "tesla" | |
"tharp" "thompson" "torvalds" "tu" "turing" "varahamihira" "vaughan" | |
"visvesvaraya" "volhard" "wescoff" "wilbur" "williams" "williamson" "wilson" | |
"wing" "wozniak" "wright" "yalow" "yonath" "zhukovsky" | |
) | |
hash_string=$1 | |
if [ -z "$hash_string" ]; then | |
echo "Usage: $0 <hash_string>" | |
exit 1 | |
fi | |
# Convert hash string to decimal | |
hash_decimal=$(echo -n "$hash_string" | md5sum | tr -d ' -' | xxd -r -p | od -An -tu8) | |
# Generate name | |
adj_index=$((hash_decimal % ${#adjectives[@]})) | |
surname_index=$((hash_decimal / ${#adjectives[@]} % ${#surnames[@]})) | |
generated_name="${adjectives[$adj_index]}_${surnames[$surname_index]}" | |
echo $generated_name |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment