Thursday, July 7, 2016

What is the best code troll you've ever seen?

True story here. This could be your next April Fools' prank.

On one Thursday, one of my colleagues, a senior web developer, left his MacBook unlocked.
I sat down, opened Terminal, typed echo '* * * * * say $(date)' | crontab , enter and left.
Then I completely forgot about it since I didn't hear a single complaint from him.

The next Monday, he told the story that he had to listen to his computer announces the time every minute (day month year hour minute and timezone) while he was listening to his music until he couldn't bear it anymore.
He stayed until 4 AM on weekend trying to fix it.
He googled everything and found nothing that could help him.
Desperately, he bought a $150 external hard drive to backup his work before clean installing his Mac. The problem's gone of course.

He almost killed me when I told him what I did.
Now, everyone locks his computer when I'm in the office :p

ps. If you try the command, type crontab -r to remove all cron entries and stop it. Or as Peter suggested, use crontab -e to remove just the trolling line. Also, you might wanna check first if he already has some entries in his crontab with crontab -l . If he already has some, then you can append an entry using -e option.


Read other related questions on Quora: Read more answers on Quora.

from Quora http://ift.tt/29upNLP

No comments:

Post a Comment