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
| FROM debian:bullseye-slim AS build-env | |
| RUN apt-get update && apt-get install -y wget | |
| RUN wget https://packages.microsoft.com/config/debian/11/packages-microsoft-prod.deb -O packages-microsoft-prod.deb \ | |
| && dpkg -i packages-microsoft-prod.deb \ | |
| && rm packages-microsoft-prod.deb | |
| RUN apt-get update && apt-get install -y apt-transport-https dotnet-sdk-6.0 | |
| WORKDIR /app |
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
| resourceGroup=linuxaad | |
| location=westeurope | |
| vmName=linuxaad | |
| az group create --name $resourceGroup --location $location | |
| az vm create \ | |
| --resource-group $resourceGroup \ | |
| --name $vmName \ | |
| --image UbuntuLTS \ |
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
| { | |
| "globals" : | |
| { | |
| "alwaysShowTabs" : true, | |
| "defaultProfile" : "{2c4de342-38b7-51cf-b940-2309a097f518}", | |
| "initialCols" : 120, | |
| "initialRows" : 30, | |
| "keybindings" : | |
| [ | |
| { |
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
| resource "azurerm_template_deployment" "demo" { | |
| name = "maparm" | |
| resource_group_name = "${azurerm_resource_group.demo.name}" | |
| template_body = <<DEPLOY | |
| { | |
| "$schema": "http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json#", | |
| "contentVersion": "1.0.0.0", | |
| "parameters": { | |
| "name": { |
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
| namespace SasTokenHelper | |
| { | |
| public static class SasTokenGenerator | |
| { | |
| public static void GenerateSasAuthorizationHeader(this HttpRequestHeaders headers, string resourceUri, DateTime expiry, string keyName, string privateKey) | |
| { | |
| string encodeUri = HttpUtility.UrlEncode(resourceUri); | |
| int timeout = CalculateEpoch(expiry); | |
| string sasToken = GenerateSasToken(encodeUri, timeout, privateKey); |
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 uuid | |
| import datetime | |
| import random | |
| import json | |
| from azure.servicebus import ServiceBusService | |
| from sense_hat import SenseHat | |
| sense = SenseHat() | |
| sbs = ServiceBusService(service_namespace='', shared_access_key_name='', shared_access_key_value='') |