Skip to content

Instantly share code, notes, and snippets.

@ajduberstein
Created September 29, 2014 06:08
Show Gist options
  • Save ajduberstein/910fb02a52cc51fbfa50 to your computer and use it in GitHub Desktop.
Save ajduberstein/910fb02a52cc51fbfa50 to your computer and use it in GitHub Desktop.
Yoman: Yo for the Terminal
Yoman: Yo for the Terminal
====================
[Get an API token and a username](https://medium.com/@YoAppStatus/yo-developers-api-e7f2f0ec5c3c), and send yourself a [Yo](http://www.justyo.co/) when your script raps up.
Sub your username and API key in below. Copy and paste it into your .bashrc.
```
function yoman () {
eval "$@"
#GIFs are essential; do not remove.
gifs=(http://i.imgur.com/wGxm6dl.gif http://i.imgur.com/d3Os2lG.gif http://i.imgur.com/HPmH9gz.gif)
rando=$[ 1 + $[ RANDOM % ${#gifs[@]}]]
random_gif=${gifs[rando-1]}
curl --data "api_token=<api_token>&username=<username>&link=${random_gif}" http://api.justyo.co/yo
}
```
Just run `yoman` before your shell command. Usage is like this:
`yoman python script.py`
Or this:
`yoman sleep 10`
Do something else instead of waiting for your code to finish up, and let Yo tell you when it's done.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment