I hereby claim:
- I am jhob on github.
- I am jhob (https://keybase.io/jhob) on keybase.
- I have a public key ASDlLovDL8vG9MXlGOCgc5h1CjFJetV0gWcTYioGvqv39wo
To claim this, I am signing this object:
| # inspired by https://gist.github.com/assaf/ee377a186371e2e269a7 | |
| # requires [n](https://github.com/tj/n) and [jq](https://stedolan.github.io/jq/) | |
| # Install nodejs version specified in package.json via n, otherwise use a blessed version | |
| # | |
| # Exit code: | |
| # 0 Successfully installed and using the desired version | |
| # 1 No package.json in current directory | |
| # | |
| # See debug messages by setting DEBUG=nish in your environment |
| { | |
| "decisionTree": { | |
| "test": {"foodInterests": "gluten-free"}, | |
| "children": { | |
| "true": { | |
| "test": {"foodInterests": "paleo"}, | |
| "children": { | |
| "true" : { | |
| "test": {"orderCount": 0}, | |
| "children": { |
I hereby claim:
To claim this, I am signing this object:
| #!/bin/bash | |
| services=(iTunes Rdio Spotify) | |
| for service in "${services[@]}"; do | |
| if ps axco pid,command | grep -v grep | egrep "$service\$" > /dev/null; then | |
| state=`osascript -e "tell application \"$service\" to get player state as string"` | |
| if [ "$state" = "playing" ] ; then | |
| artist_name=`osascript -e"tell application \"$service\" to get artist of current track"` | |
| song_title=`osascript -e"tell application \"$service\" to get name of current track"` | |
| artist=`echo $artist_name | sed "s/[[:space:]]/%20/g"` |