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 Microsoft.Azure.Devices.Client; | |
| using System; | |
| using System.IO; | |
| using System.Security.Cryptography; | |
| using System.Text; | |
| using System.Text.Json; | |
| using System.Threading.Tasks; | |
| namespace rido_self_describing | |
| { |
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 Microsoft.Azure.Devices; | |
| using Microsoft.Azure.Devices.Client; | |
| using Microsoft.Azure.Devices.Shared; | |
| using Newtonsoft.Json; | |
| using System; | |
| using System.Threading.Tasks; | |
| namespace rido_learn_WritableProperties | |
| { | |
| class Program |
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 Microsoft.Azure.Devices.Client; | |
| using System; | |
| using System.IO; | |
| using System.Threading.Tasks; | |
| namespace c2d_device | |
| { | |
| class Program | |
| { | |
| static async Task Main(string[] args) |
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
| const https = require('https') | |
| const crypto = require('crypto') | |
| const hubUrl = 'xxx.azure-devices.net' | |
| const path = '/devices?api-version=2020-09-30' | |
| const key = 'xxxxxxxxxxxx' | |
| const generateSasToken = (resourceUri, signingKey, policyName, expiresInMins) => { | |
| resourceUri = encodeURIComponent(resourceUri); |
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
| { | |
| "@context": "dtmi:dtdl:context;2", | |
| "@id": "dtmi:com:example:mydevice;1", | |
| "@type": "Interface", | |
| "displayName": "mydevice", | |
| "contents": [ | |
| { | |
| "@type": "Telemetry", | |
| "name": "workingSet", | |
| "schema": "double" |
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
| "Add DTDL Property" : { | |
| "prefix": ["dtp"], | |
| "body" : ["{ \n\t\"@type\" : \"Property\", \n\t\"name\" : \"$1\", \n\t\"schema\" : \"$0\" \n},"], | |
| "description": "Adds a DTDL property" | |
| }, | |
| "Add DTDL Telemetry" : { | |
| "prefix": ["dtt"], | |
| "body" : ["{ \n \t\"@type\" : \"Telemetry\", \n\t\"name\" : \"$1\", \n\t\"schema\" : \"$0\" \n},"], | |
| "description": "Adds a DTDL Telemetry" | |
| }, |
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
| { | |
| "@context": "dtmi:dtdl:context;2", | |
| "@id": "dtmi:com:example:mypnpdevice;1", | |
| "displayName": "MyPnPDevice", | |
| "@type": "Interface", | |
| "contents": [ | |
| { | |
| "@type": "Property", | |
| "name": "myProperty", | |
| "schema": "string" |
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
| Function AddTo-SystemPath { | |
| Param( | |
| [array]$PathToAdd | |
| ) | |
| $VerifiedPathsToAdd = $Null | |
| Foreach($Path in $PathToAdd) { | |
| if($env:Path -like "*$Path*") { | |
| Write-Host "Currnet item in path is: $Path" |
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
| node_modules/ | |
| .vscode/ |
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 logger = LoggerFactory.Create(builder => { builder.AddConsole(); }).CreateLogger("Cat1"); |