Skip to content

Instantly share code, notes, and snippets.

@bebraw
Created June 22, 2013 14:17
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 bebraw/5841036 to your computer and use it in GitHub Desktop.
Save bebraw/5841036 to your computer and use it in GitHub Desktop.
Pipe to OS X notifier. Requires https://npmjs.org/package/node-notifier and https://github.com/alloy/terminal-notifier . You can install latter through MacPorts (port install terminal-notifier). Usage: foo | ./notify.js
#!/usr/bin/env node
var notifier = require('node-notifier');
var stdin = process.openStdin();
stdin.setEncoding('utf8');
stdin.on('data', function(chunk) {
notifier.notify({message: chunk});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment