Skip to content

Instantly share code, notes, and snippets.

View chgeuer's full-sized avatar
🏠
Working from Düsseldorf

Dr. Christian Geuer-Pollmann chgeuer

🏠
Working from Düsseldorf
View GitHub Profile
#!/bin/bash
resource="https://api.loganalytics.io/"
aadTenant="chgeuerfte.onmicrosoft.com"
SAMPLE_SP_APPID="465ffd36-4473-47ff-8107-6c478c074adf"
SAMPLE_SP_KEY="..."
access_token="$(curl \
--silent \
--request POST \
ssh 52.166.92.21
#
# Install jq (https://stedolan.github.io/jq/)
#
sudo apt-get -y install jq
#
# Install yq & xq (https://github.com/jeffbr13/xq)
#
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"variables": {
"nsgName": "nsg",
"numberOfASGs": 130,
"apiVersions": { "network": "2018-01-01" }
},
"resources": [
{
defmodule StatefulServer do
defmodule Demo do
alias StatefulServer.WorkerSupervisor, as: WorkerSupervisor
def demo do
once_per_second = Demo.start(200)
ten_per_second = Demo.start(220)
hundret_per_second = Demo.start(250)
IO.puts("Launced processes")
namespace redis_parkhaus
{
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using StackExchange.Redis;
class Program
{
static async Task Main(string[] args)
#!/bin/bash
aadTenant="sapdevchallenge.onmicrosoft.com"
resource="https://sapteameagleui.blob.core.windows.net"
container="tobias"
blob="test"
deviceResponse="$(curl \
--silent \
--request POST \

generate CSV

query="[?contains(instanceId,'providers/Microsoft.Compute/virtualMachines/') && (contains(product,'Virtual Machines') || contains(product,'VM RI - Compute'))].{start:usageStart,end:usageEnd,id:instanceId}"

echo -e "from\tto\tID" > usage.csv
for sub in $(az account list | jq -r ".[].id")
do
 az consumption usage list \

Signing in to Azure from bash

Please note all of these shell samples use jq for JSON parsing...

A few variables first

#!/bin/bash

aadTenant="chgeuerfte.onmicrosoft.com"
Moved to https://github.com/chgeuer/external_gardener_machine-controller-manager/blob/master/pkg/driver/driver_azure.go