Skip to content

Instantly share code, notes, and snippets.

@apathor
Created April 9, 2020 21:39
Show Gist options
  • Save apathor/49bb1ce1e864a858ca52b2c6dd2ff9be to your computer and use it in GitHub Desktop.
Save apathor/49bb1ce1e864a858ca52b2c6dd2ff9be to your computer and use it in GitHub Desktop.
unimoon is a function
unimoon ()
{
local pha=(πŸŒ‘ πŸŒ’ πŸŒ“ πŸŒ” πŸŒ• πŸŒ– πŸŒ— 🌘);
local cyc=2551392 adj=-604800;
local now pos num;
now="${1:-$(printf "%(%s)T\n" "-1")}";
pos=$(( (now + adj) % cyc ));
num=$(( pos / ( cyc / ${#pha[@]} ) ));
printf "%s\n" "${pha[$num]}"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment