PUT https://management.azure.com/subscriptions/SUBSCRIPTION_ID/resourcegroups/premiumbus/providers/
Authorization: Bearer eyJ...
{
"id": "/subscriptions/SUBSCRIPTION_ID/resourcegroups/premiumbus/providers/Microsoft.ServiceBus/
"properties": {
"defaultAction": "Deny",
"ipRules": [
{"ipMask": "86.125.28.105"},
This file contains 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.IO; | |
using System.Threading.Tasks; | |
using Microsoft.AspNetCore.Mvc; | |
using Microsoft.Azure.WebJobs; | |
using Microsoft.Azure.WebJobs.Extensions.Http; | |
using Microsoft.AspNetCore.Http; | |
using Microsoft.Extensions.Logging; | |
using Newtonsoft.Json; | |
using Azure.Identity; |
This file contains 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
package azuremysqltest; | |
import java.sql.*; | |
import java.util.ArrayList; | |
import java.util.List; | |
public class App { | |
public static void main(String[] args) { |
This file contains 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
#!/usr/bin/env python3 | |
# pip install azure-keyvault-secrets azure-identity | |
from blessings import Terminal | |
t = Terminal() | |
import json | |
from azure.identity import DefaultAzureCredential, InteractiveBrowserCredential | |
from azure.keyvault.secrets import SecretClient |
This file contains 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
deleteEmptyProps(obj: any): any { | |
// modifies passed obj in place, removing empty properties (inc. empty arrays) | |
return Object.keys(obj).forEach(k => { | |
if (!obj[k] || obj[k] === undefined || | |
Array.isArray(obj[k]) && obj[k].length === 0) { | |
delete obj[k]; | |
} | |
}); | |
} |
This file contains 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
$ cat secret.json | base64 > secret.json.base64 | |
$ az keyvault secret set --vault-name alice --name secret-from-cli -f secret.json.base64 | |
{ | |
... | |
"tags": { | |
"file-encoding": "utf-8" | |
}, | |
"value": "ewogICAgInRoaXMiOiAiaXMiLAogICAgInNvbWUiOiAianNvbiwKICAgICJtYXliZSI6IHsKICAgICAgICAieWVhaCI6IDEKICAgIH0KfQo=\n" | |
} |
This file contains 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
https://azure.microsoft.com/en-us/pricing/details/media-services/ | |
SLA | |
99.9% | |
ENCODER | |
0.030 EUR per output minute | |
STANDARD STREAMING ENDPOINT | |
1.76 EUR per day |
This file contains 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
#### |
This file contains 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 logging | |
import socket | |
log = logging.getLogger('udp_server') | |
def udp_server(host='127.0.0.1', port=1234): | |
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) | |
s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) |
This file contains 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
let Client = require('azure-iothub').Client; | |
let Message = require('azure-iot-common').Message; | |
let names = require('docker-names'); | |
let IOTHUB_CONNSTR_SERVICE = process.env.IOTHUB_CONNSTR_SERVICE; | |
let serviceClient = Client.fromConnectionString(IOTHUB_CONNSTR_SERVICE); | |
module.exports = function(context, req) { | |
context.log('JavaScript HTTP trigger function processed a request.'); | |
let intent = req.body.request.intent.name; |