1234567890 Day Countdown
- published:
- 2009.02.13
Unix time 1234567890 is quickly approaching today has passed. Don't know what the heck that means? Want to know exactly how much longer before it happens? Check out 1234567890day.com. I decided to quickly whip together a couple ways for geeks to count up to the event on the command line.
PHP
Please, don't put this code on a web page. I warned you.
<?php while (($t = time()) <= 1234567890) {print $t."\n"; usleep(500000);} ?>
Mac OS X Terminal
Create a file called 1234567890day.sh or download mine. You may have to remember to chmod 755
the file before you can run it from the Terminal.
#!/bin/bash while [ `date +%s` -lt 1234567890 ]; do date +%s sleep 1 done echo 'Happy 1234567890 Unix time!' say 'Happy 1234567890 Unix time!'
(Hrmm... the SHJS language file for shell scripts seems totally hosed. If I try to use it, it erases my code rather than adding syntax highlighting.)