dart-lang/www.dartlang.org — pull request #1027 by srawlins (2014-09-12 07:17:08+00:00)
Title: make server: Don't fire the browser until jekyll is ready

Currently when you `make server`, your browser immediately opens to a dead page, and you must ALT+TAB back to the terminal to know when you can refresh. This PR fixes that:

ruby -e 'sleep 3; 1.upto(30) { break if system("curl -I -s $(LOCAL)"); print "."; sleep 1 }; exec "$(OPEN)"'
^ ^ ^ ^ ^ ^
| '- - break when the site is ready - -' | '- open site -'
| |
'- - - - - - - - - - - loop for up to 30 seconds - - - - - - - - - - -'