Forget the pwn how do I do this
Also, HN used to think this was cool now there are 20 posts blaming the hacker…
Forget the pwn how do I do this
Also, HN used to think this was cool now there are 20 posts blaming the hacker…
Fun fact: the `bell` control character is part of the ascii standard (and before that the baudot telegraph encoding!) and was originally there to ring a literal bell on a recipient's telegraph or teletype machine, presumably to get their attention that they had an incoming message.
To keep backwards compatibility today's terminal emulators trigger the system alert sound instead.
\u0007
It’s handy to put in your shell code that takes a few seconds, or more, to complete.I'm not sure whether it's HN thinking this is uncool (it is cool!) or it's HN taking the unfortunate realistic position that this type of stuff only gets the reporters into trouble, after seeing it happening time and time ago. People doing cool stuff get in trouble, and it's sad to watch.
This guy just grabbed publicly available information, and by 'public' I mean put out onto the web un-protected, just put out there. If you can just basically browse to something, is it really his fault for finding it.
It's like if I have a front door on my house, and just in the front hallway I have a huge naked picture of my wife. If I leave the door open, can I get mad at pedestrians walking by, for seeing the picture. Maybe they walkup to ring the door bell just to get closer look, walking up to the door, but not going in, is allowed.
I think the law is pretty wrong.
It means I can break law by just accidentally browsing to something. Can be breaking the law just by seeing it, before knowing I'm doing something wrong.
Basically, just see something and be guilty before being able to look away.
It is meant to be used after a command or a chain of commands to give feedback about success or failure. The alias by itself doesn't issue a ping, but can easily be amended to do so.
What worked for me is to add an invocation of `paplay`. Actually it is two different invocations, one sound for success and another one for failure.
In addition to that I also send an ASCII 0x07. I have both `tput bel` and `echo -e "\a"` in my alias, but don't remember why. Probably one of them is enough. I do this because I have my terminal emulator set to visual bell an that causes the tab to change color when the command is finished and I can immediately see it even if I am in another tab.
beep() {
if [ $? -eq 0 ]
then
file=/usr/share/sounds/purple/receive.wav
ret='true'
else
file=/usr/share/sounds/purple/alert.wav
ret='false'
fi
(aplay $file 2>/dev/null >/dev/null &);
$ret
}
Can be called like this: $ command ; beep
Depending on the return value it'll give a different alert. It preserves the return value so you can still chain other dependent commands after it.This depends on the libpurple sounds to be where they are (works in ubuntu at least)
Fish config: https://github.com/qznc/dot/blob/master/config/fish/config.f...
Notification script: https://github.com/qznc/dot/blob/master/bin/notify_long_runn...
I stole it from some zsh solution originally.
#!/usr/bin/env zsh
(mpg123 /path/to/processing3.mp3 > /dev/null 2>&1)
processing3.mp3 is the "task completed" sound from star trek,then it's just `./foobar.sh && boc` or `./foobar.sh; boc` as appropriate.
sudo apt install pulseaudio-utils
./some_script ; paplay /usr/share/sounds/freedesktop/stereo/complete.oga ./myscript.sh; curl -d "Script done" \
ntfy.sh/mytopic
Disclaimer: I am the maintainer of ntfy.[1] https://ntfy.sh/ + https://github.com/binwiederhier/ntfy