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 FirebaseSharp.Portable; | |
using Newtonsoft.Json; | |
using System; | |
using System.Collections.Concurrent; | |
using System.Collections.Generic; | |
using System.ComponentModel; | |
using System.Text; | |
using System.Windows; | |
using System.Windows.Controls; | |
using System.Windows.Input; |
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
select count(*) as Count, | |
((elapsed / 1000) * 1000) + 1000 as LessThanSecond | |
from speedies | |
where elapsed is not null | |
group by ((elapsed / 1000) * 1000) + 1000 |
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
private RestResponse SendSms(string sid, string token, string to, string from, string key, string msg) | |
{ | |
var client = new RestClient("https://api.twilio.com") | |
{ | |
Authenticator = new HttpBasicAuthenticator(sid, token), | |
}; | |
var request = new RestRequest | |
{ | |
Method = Method.POST, |
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
static async Task Listen(string url) | |
{ | |
HttpClient client = new HttpClient(); | |
client.Timeout = TimeSpan.FromHours(1); | |
client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("text/event-stream")); | |
var response = await client.GetAsync(url, HttpCompletionOption.ResponseHeadersRead); | |
using(var content = await response.Content.ReadAsStreamAsync()) | |
using (StreamReader sr = new StreamReader(content)) |