Created
June 2, 2014 18:22
-
-
Save Redth/2d5f0ba07c23c7bc3590 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Net.Http; | |
namespace IsItRdyYet | |
{ | |
class MainClass | |
{ | |
public static void Main (string[] args) | |
{ | |
var http = new HttpClient (); | |
while (true) { | |
System.Threading.Thread.Sleep (10000); | |
Console.Write ("Is ready yet? "); | |
var data = http.GetStringAsync ("http://developer.apple.com/ios").Result; | |
if (data.Contains ("class=\"maintenance\"")) { | |
Console.WriteLine ("Nope."); | |
continue; | |
} | |
Console.WriteLine ("YES! OMG, is ready!!!!1"); | |
for (int i = 0; i < 5; i++) | |
Console.Beep (); | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment