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 builder = DistributedApplication.CreateBuilder(args); | |
var database = builder.AddAzureCosmosDB("cosmos").AddDatabase("iotdb") | |
//.RunAsEmulator() | |
.WithEndpoint(name: "emulator", targetPort: 8080) | |
.WithAnnotation(new ContainerImageAnnotation | |
{ | |
Registry = "<registry name>", | |
Image = "<image name>", | |
Tag = "<tag>" |
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
//@ts-check | |
process.env["NODE_TLS_REJECT_UNAUTHORIZED"] = "0"; | |
const { CosmosClient } = require("@azure/cosmos"); | |
const client = new CosmosClient({ | |
endpoint: "https://localhost:8081", | |
key: | |
"C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw==" | |
}); |
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
//@ts-check | |
const cosmos = require("@azure/cosmos"); | |
const {items} = require("./sampleItems"); | |
process.env.NODE_TLS_REJECT_UNAUTHORIZED = 0; | |
const {CosmosClient} = cosmos; | |
const endpoint = process.env.COSMOS_ENDPOINT; | |
const key = process.env.COSMOS_KEY; |
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
import createHmac from "create-hmac"; | |
const hmac = createHmac("sha256", "hello world").update("I love cupcakes").digest("hex"); | |
console.log(hmac); |
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
{ | |
"invocationId": "a3ea24b8-d262-41d0-a57b-f6a207ade9c2", | |
"executionContext": { | |
"invocationId": "a3ea24b8-d262-41d0-a57b-f6a207ade9c2", | |
"functionName": "hello", | |
"functionDirectory": "C:\\workspace\\temp\\contextjs\\hello" | |
}, | |
"log": "[FUNCTION]", | |
"bindingData": { | |
"invocationId": "a3ea24b8-d262-41d0-a57b-f6a207ade9c2", |
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 System; | |
using System.Threading.Tasks; | |
using EdgeJs; | |
class Program | |
{ | |
public static async Task Start() | |
{ | |
var func = Edge.Func(@" | |
return function (data, callback) { |
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
public class StartUpWork { | |
private static StartUpWork _singleton; | |
private string initializeOnce; | |
public StartUpWork() { | |
// Do long startup tasks/create database connection pools/whatever you want to happen once | |
this.initializeOnce = "Woooooo!"; | |
} | |
public static StartUpWork ensureStartUp() { |
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
{ | |
"logger": { | |
"categoryFilter": { | |
"defaultLevel": "Information", | |
"categoryLevels": { | |
"Host.Results": "Error", | |
"Function": "Error", | |
"Host.Aggregator": "Information" | |
} | |
}, |
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
{ | |
"properties": { | |
"issue_description": { | |
"type": "number" | |
}, | |
"issue_title": { | |
"type": "string" | |
} | |
}, | |
"type": "object" |
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
requests | |
| where timestamp > ago(30m) | |
| summarize percentiles(duration, 50, 95, 99) by bin(timestamp, 1m) | |
| render timechart |
NewerOlder