Skip to content

Instantly share code, notes, and snippets.

@cariandrum22
Created January 10, 2019 11:07
Show Gist options
  • Save cariandrum22/6e9b9ac2337dc55f975bc43ad748c028 to your computer and use it in GitHub Desktop.
Save cariandrum22/6e9b9ac2337dc55f975bc43ad748c028 to your computer and use it in GitHub Desktop.
Message of the day
function fish_greeting -d "what's up, fish?"
status --is-login
if [ $status = 0 ]
if which figlet > /dev/null
figlet "Jehoshaphat!"
echo ""
end
echo "Name: "(hostname)
echo "Uptime: "(thunnus.os.uptime)
echo ""
echo "CPU: "(thunnus.os.cpu)
echo "Memory: "(thunnus.os.memory.total)
echo "Swap: "(thunnus.os.swap.total)
echo "Disk: "(df -h / | tail -n1 | awk '{ print $2 }')
echo "Distro: "(thunnus.os.distro)
echo ""
echo "CPU Load: "(thunnus.os.load_average)
echo "Free Memory: "(thunnus.os.memory.free)
echo "Free Swap: "(thunnus.os.swap.free)
echo "Free Disk: "(df -h / | tail -n1 | awk '{ print $3 }')
echo ""
echo "Public Address: "(curl -s inet-ip.info/)
# TODO: Solve the problem that the interface name changes for each environment.
echo "Private Address: "(ifconfig en0 | grep inet | awk '{print $2}' | tail -n1)
if which fortune cowsay > /dev/null
echo ""
fortune | cowsay -f (cowsay -l | tail -n +2 | tr ' ' '\n' | gshuf -n1)
end
end
end
@cariandrum22
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment