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 Azure.Identity; | |
| namespace graphapitest | |
| { | |
| class Program | |
| { | |
| static void Main(string[] args) | |
| { | |
| var cred = new DefaultAzureCredential(new DefaultAzureCredentialOptions() { SharedTokenCacheUsername = "email@email.com" }); |
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
| { | |
| "visual": { | |
| "name": "liquidFillGauge", | |
| "displayName": "liquidFillGauge", | |
| "guid": "liquidFillGaugeCA6D0134FC6446EF90CC6934C9812269", | |
| "visualClassName": "Visual", | |
| "version": "1.0.0", | |
| "description": "", | |
| "supportUrl": "", | |
| "gitHubUrl": "" |
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 iotHubName = pm.environment.get("iotHubName"); | |
| var iotHubKey = pm.environment.get("iotHubKey"); | |
| var iotHubTokenExpiration = pm.environment.get("iotHubTokenExpiration"); | |
| var iotHubPolicyName = pm.environment.get("iotHubPolicyName"); | |
| pm.globals.clear("iotHubSasToken"); // clear out token on first run. | |
| // See this doc for details: https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-devguide-security | |
| var resourceUri = encodeURIComponent(iotHubName + '.azure-devices.net'); // The resource uri | |
| var expiry = Math.ceil((Date.now() / 1000) + iotHubTokenExpiration * 60); // Expire the token 60 minutes from now |
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
| pm.sendRequest({ | |
| url: 'https://login.microsoftonline.com/' + pm.environment.get("tenantId") + '/oauth2/token', | |
| method: 'POST', | |
| header: 'Content-Type: application/x-www-form-urlencoded', | |
| body: { | |
| mode: 'urlencoded', | |
| urlencoded: [ | |
| {key: "grant_type", value: "client_credentials", disabled: false}, | |
| {key: "client_id", value: pm.environment.get("clientId"), disabled: false}, | |
| {key: "client_secret", value: pm.environment.get("clientSecret"), disabled: false}, |
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
| docker run --privileged -it -v /var/run/docker.sock:/var/run/docker.sock jongallant/ubuntu-docker-client | |
| docker run --net=host --ipc=host --uts=host --pid=host -it --security-opt=seccomp=unconfined --privileged --rm -v /:/host alpine /bin/sh | |
| chroot /host |
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
| subscriptionId: | |
| clientId: | |
| clientSecret: | |
| tenantId: | |
| deviceStorageAccountName: | |
| deviceStorageAccountKey: | |
| resourceGroupName: | |
| resourceName: | |
| resourceKey: | |
| iotHubCreateDeleteName: |
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
| module powerbi.extensibility.visual { | |
| export class Visual implements IVisual { | |
| private target: HTMLElement; | |
| private selectionManager: ISelectionManager; | |
| private selectionIds: any = {}; | |
| private host: IVisualHost; | |
| private isEventUpdate: boolean = false; | |
| constructor(options: VisualConstructorOptions) { | |
| this.target = options.element; |
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
| { | |
| "dataRoles": [ | |
| { | |
| "displayName": "Values", | |
| "name": "values", | |
| "kind": "Grouping" | |
| } | |
| ], | |
| "dataViewMappings": [ | |
| { |
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
| { | |
| "visual": { | |
| "name": "liquidFillGauge", | |
| "displayName": "liquidFillGauge", | |
| "guid": "liquidFillGauge93CE6A47554D42C181409FA800464B76", | |
| "visualClassName": "Visual", | |
| "version": "1.0.0", | |
| "description": "", | |
| "supportUrl": "", | |
| "gitHubUrl": "" |
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
| { | |
| "deviceId": "{{deviceId}}", | |
| "properties": { | |
| "desired": { | |
| "deviceName": "{{deviceName}}" | |
| } | |
| } | |
| } |