x8puwq
Last Updated: August 04, 2018
·
789
· jacaetevha

Random Encouragement

Are you a remote developer, shut up in your hole 8+ hours a day without much interaction? I play music for part of the day to drown out the silence (or the farmer's loud machinery outside my window), but every now and again it would be nice to hear a word of encouragement or someone cheering me on.

I've set up a git hook that will cheer me on after every commit (thanks to David Hilowitz):

#!/bin/sh

# Play a sound after committing
afplay -v 0.03 /Library/Application\ Support/GarageBand/Instrument\ Library/Sampler/Sampler\ Files/Applause\ and\ Laugher/Kids\ Cheering.aif > /dev/null 2>&1 &

Save that file into your repo's hooks directory as post-commit and make it executable.

Of course, if you aren't running a Mac you'll need to change the afplay command to something else (eg. mplayer, play, mpg123, mpg321). Also if you don't have the GarageBand files, you'll need to change the sound that it plays.

How about a random word of encouragement? Add this line to your crontab:

30 8-18 * * 1-5 sleep ${RANDOM:0:2}m ; say -v Victoria 'Nice work. Keep going!'

Between 0830 and 1800 you'll get a nice message at random times. All you Linux users should use this trick or something like it for the say command.

Now...

If you find yourself in need of these types of feedback just to get through your day, you might think about getting out more, or think about changing jobs. I really posted them here just for fun. (Actually, I do use the kids' cheering on commit, but I don't need it... really... I can stop at anytime.)

Cheers!

4 Responses
Add your response

7317

Thanks for sharing, and keep up the good work!

over 1 year ago ·
7319

On Linux you can use "play" command.

over 1 year ago ·
7335

play was included in my list of Linux alternatives. However, I'm not sure that it's available on all distributions, by default. What distro are you running?

over 1 year ago ·
30278

I have been suffering online more than lots of effort then i found this online tutorial and know why usb port have stopped working in my windows device. if you are also suffering from this problem then go to our given link https://fixforwindows.com/usb and find the solutions in without any pay.

2 months ago ·