Skip to content

Instantly share code, notes, and snippets.

@ip2k
Created January 27, 2015 21:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ip2k/7fe7861c6a695d0779dc to your computer and use it in GitHub Desktop.
Save ip2k/7fe7861c6a695d0779dc to your computer and use it in GitHub Desktop.
pipe stdout of any command to a HipChat room
alias hcpipe='tee >(cat >&2 >&1)| curl --location -XPOST https://api.hipchat.com/v2/room/HIPCHAT-API-ROOM-NUMBER/notification?auth_token=YOUR-HIPCHAT-NOTIFY-AUTH-TOKEN-FOR-THAT-ROOM -H "Content-Type: text/plain" -d "/code $(cat 2>&1)"'
@ip2k
Copy link
Author

ip2k commented Jan 27, 2015

to use this, you'd do e.g.

git blame README | hcpipe

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