Skip to content

Instantly share code, notes, and snippets.

@b4284
Created December 31, 2015 15:16
Show Gist options
  • Select an option

  • Save b4284/9b5962b74df7c8ef4e8f to your computer and use it in GitHub Desktop.

Select an option

Save b4284/9b5962b74df7c8ef4e8f to your computer and use it in GitHub Desktop.
Shell script to play your song right at the moment of clock zero 2016 !
START_TIME=$(( $(date -d "2016-01-01 00:00:00" +%s) - 60 * $MINUTE - $SECOND ))
while :; do
if [[ $(date +%s) -ge $START_TIME ]]; then
mplayer $FILE;
break;
fi;
sleep 1;
echo "waiting";
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment