Skip to content

Instantly share code, notes, and snippets.

@z0mbix
Last active August 29, 2015 14:11
Show Gist options
  • Save z0mbix/d4eb5eaf634a5f6c6351 to your computer and use it in GitHub Desktop.
Save z0mbix/d4eb5eaf634a5f6c6351 to your computer and use it in GitHub Desktop.
# http://replygif.net/about
# You need jq and rl
if which rl >/dev/null; then
replygif_api_key='39YAprx5Yi'
tags=(pleased approval excited party clapping dance happy)
random_tag=${tags[$RANDOM % ${#tags[@]} ]}
gif=$(curl -s http://replygif.net/api/gifs?api-key=${replygif_api_key}\&tag=${random_tag} | jq .[].file -r | rl -c1)
hipchat_message="(success) -> ${gif}"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment