Last active
June 13, 2016 20:48
-
-
Save bignimbus/705d695fece8f5d94755 to your computer and use it in GitHub Desktop.
drake - rake but with a drake gif
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 | |
# place this script in ~/bin/ | |
# and update your .bash_profile or .bashrc with: | |
# export PATH="$HOME/bin/" | |
GIF=$(ruby -e "require 'net/http';require 'json';json=Net::HTTP.get(URI('https://api.giphy.com/v1/gifs/random?api_key=dc6zaTOxFJmzC&tag=hotline%20bling'));output=JSON.parse(json);puts output['data']['image_url']") | |
# this uses the giphy public beta api key, for demonstration only | |
# replace this key with your own key, please | |
IMGCAT_PATH=$(which imgcat) | |
if [[ $IMGCAT_PATH == "" ]]; then | |
open "$GIF" | |
else | |
imgcat "$GIF" | |
fi | |
rake $@ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment