5 ms·
Oh. I thought it was a free software, federated implementation of Facebook's "poking" feature.
by jtvjan 6y ago
Oh. I thought it was a free software, federated implementation of Facebook's "poking" feature.
- corobo 6y agoCombining the two (well, the name and your comment) I'd love a poke command that acts like tee but sends a notification when the calling process ends. ./backup.sh | poke username Where username would accept a system user, phone number, email address, webhook url, whatever.
- wiml 6y agoIt's not exactly what you describe, but you might find some use in the pv (pipe viewer) command: http://www.ivarch.com/programs/pv.shtml http://www.ivarch.com/programs/pv.shtml
- jolmg 6y agoIs the point of the pipe that the notification should include the output of the command like the following? ./backup.sh | ( notify-send "$(cat)" ) though that could also be written: notify-send "$(./backup.sh)" If you also want the output in the terminal, you could use tee: ./backup.sh | tee >(notify-send "$(cat)") If you want it to be an email or SMS, there are probably commands that you could replace notify-send with.
- corobo 6y agoNot really sure with pipe. It could probably just be &&'d with an optional message parameter to be fair. Or sprinkle some AI on it and decide based on the destination. I wouldn't want a huge log being sent via sms but nbd for email.
- jolmg 6y ago> Or sprinkle some AI on it and decide based on the destination. Or avoid that overcomplication and specify what you want. As the one writing the command, you should know if the output is big and what the ideal is for the destination you want.
- wizzwizz4 6y agoHave it specified in a config file, and provide presets for common configurations (e.g. last line and exit code in SMS but full log in email).
- corobo 6y agoYou don't have to make it for me haha. This is not a product specification and I am not a demanding customer. It's a hypothetical command that popped into my head while browsing a site with hacker in the name. It's also a command I could throw together in about an hour with a bit of bash if I really wanted it. Mix in a bit of curl, bit of whatever the sendmail command is these days, bit of Twilio. Job's a good'un. For the record "sprinkle some AI on it" is if statements, it was a yoke.
- koolba 6y agoIt should be reversed: poke username -- path/to/command arg1 arg2 The command would fork, execute the child, wait for the child to finish, then send out its notification. This would also allow flags like: poke --on-failure @koolba -- path/to/foo Or even handling the child taking too long: poke --on-lagging 20m @koolba -- path/to/something-that-might-hang
- jonathankoren 6y agoI thought this was clone Yo. https://slate.com/business/2014/06/marc-andreessen-explains-why-mobile-app-yo-is-a-big-deal-one-bit-signaling-takes-up-70-percent-of-bangladesh-cell-phone-traffic-at-any-moment.html https://slate.com/business/2014/06/marc-andreessen-explains-...
- pwdisswordfish0 6y agoPlease, folks, stop posting these "I thought this was going to be about X" comments.
- Hackbraten 6y agoI’m never going to understand why HN frowns upon humor so much.
- dkjaudyeqooe 6y agoMe neither. I think the trick is to make it really, really dry and deadpan, then the humourless don't even notice and others have can have a little chuckle.
- vorpalhex 6y agoIt's offtopic.
- carapace 6y agoIf you don't quash quips it gets all redditty.
- tpush 6y agoHumor is fine. Humor as the only substance of a comment just wastes everyone's time.
- Semiapies 6y agoEspecially when this particular joke is never actually funny.
- gjm11 6y agoAs I have said before in response to similar comments: HN has no problem with humour. Where it differs from, say, typical reddits is that in order to get upvoted rather than dowvoted, humorous comments have to actually be funny.