This file contains hidden or 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
| { | |
| "$schema": "http://json.schemastore.org/proxies", | |
| "proxies": { | |
| "Domain Redirect": { | |
| "matchCondition": { | |
| "route": "/{*shortUrl}" | |
| }, | |
| "backendUri": "http://%WEBSITE_HOSTNAME%/api/UrlRedirect/{shortUrl}" | |
| }, | |
| "Api": { |
This file contains hidden or 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
| { | |
| "frameworks": { | |
| "net46":{ | |
| "dependencies": { | |
| "Microsoft.ApplicationInsights": "2.2.0" | |
| } | |
| } | |
| } | |
| } |
This file contains hidden or 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
| #r "Microsoft.WindowsAzure.Storage" | |
| using Microsoft.ApplicationInsights; |
This file contains hidden or 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
| var startTime = DateTime.UtcNow; | |
| var timer = System.Diagnostics.Stopwatch.StartNew(); | |
| TableOperation operation = TableOperation.Retrieve<ShortUrl>(partitionKey, shortUrl); | |
| TableResult result = inputTable.Execute(operation); | |
| // BOOM track a custom dependency! | |
| telemetry.TrackDependency("AzureTableStorage", "Retrieve", startTime, timer.Elapsed, result.Result != null); | |
| ShortUrl fullUrl = result.Result as ShortUrl; |
This file contains hidden or 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
| # | |
| az account list --output table | |
| # |
This file contains hidden or 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
| # | |
| az account set --subscription=jeliknes | |
| # |
This file contains hidden or 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
| [FunctionName("ProcessQueue")] | |
| public static void ProcessQueue([QueueTrigger(queueName: "requests")]string request, | |
| [DocumentDB(URL_TRACKING, URL_STATS, CreateIfNotExists = true, | |
| ConnectionStringSetting ="CosmosDb")]out dynamic doc, | |
| TraceWriter log) | |
| { | |
| } |
This file contains hidden or 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
| // cosmos DB | |
| doc = new ExpandoObject(); | |
| doc.id = Guid.NewGuid().ToString(); | |
| doc.page = page; | |
| doc.count = 1; | |
| doc.timestamp = date; | |
| if (!string.IsNullOrWhiteSpace(customEvent)) | |
| { | |
| ((IDictionary<string, object>)doc).Add(customEvent, 1); | |
| } |
This file contains hidden or 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
| { | |
| "id": "d4520334-8c1d-4250-ac01-64ac72884ac1", | |
| "page": "medium.com/@felixclack/writing-great-commit-messages-for-better-code-review-70b21dac5788/", | |
| "count": 1, | |
| "timestamp": "2017-10-09T18:57:26", | |
| "twitter": 1, | |
| "_rid": "GzYTAO2ucgATAAAAAAAAAA==", | |
| "_self": "dbs/GzYTAA==/colls/GzYTAO2ucgA=/docs/GzYTAO2ucgATAAAAAAAAAA==/", | |
| "_etag": "\"36005c64-0000-0000-0000-59dbc6950000\"", | |
| "_attachments": "attachments/", |
This file contains hidden or 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 (var client = new DocumentClient(new Uri(endpoint), key)) | |
| { | |
| Console.WriteLine("Starting..."); | |
| FixIt(client).Wait(); | |
| Console.ReadLine(); | |
| } |