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
@description('The secret')
@secure()
param secretValue string
var names = {
identity: {
setup: 'uami-setup'
runtime: 'uami-runtime'
}
runtimeKeyVault: {
#!/bin/bash
access_token="$( az account get-access-token --resource-type arm | jq -r '.accessToken' )"
# echo "${access_token}" | jq -R 'split(".")|.[1]|@base64d|fromjson'
subscriptionId="706df49f-998b-40ec-aed3-7f0ce9c67759"
# IFS='' read -r -d '' azureResourceGraphQuery <<'EOF'
# SpotResources

incoming comments

  • Eleanore
    • Summary and decision matrix?
  • Julie NG
    • Code Reuse bzw. Modules (Knowledge Sharing im Org) fehlen.
    • Anderer Use Case is das manche "Best Practices" v.a. globally unique names finde ich 1000x leichter mit TF oder Pulumi. Deshalb braucht man crazy Bash Scripten mit ARM/Bicep
    • Discuss "mix" scenario. Multiple times damaged an AKS cluster, when Terraform aggresively prefered to delete and re-create infrastructure
    • Clean Up is simpler with Terraform statefiles. Check out https://julie.io/writing/arm-terraform-pulumi-infra-as-code/
  • Laura Nicolas
https://hashcat.net/hashcat/
```cmd
hashcat-6.2.5\hashcat.exe --hash-type 100 --attack-mode 3 --backend-devices 1,2 "sha1.txt" ?a?a?a?a?a?a
```
0f4ef7cba35ade6bd6f34ed974f22de895f0e2cd
0099069d526352ab79023de2daeda7a786414d65

Sequence Diagram Comparison

MermaidJS

```mermaid
sequenceDiagram
    Alice->>John: Hello John, how are you?
 John--&gt;&gt;Alice: Great!
// F# version of https://twitter.com/gsferreira/status/1516827091127394309/
open System
open System.IO
type PotentialProcessingError = | StringMissing | StringTooShort
let application store = function
| None -> Error StringMissing
| Some (str: string) when str.Length < 5 -> Error StringTooShort

Keyboards

Planck

2022-04-01 Planck

Preonic

2022-04-01 Preonic

Message Types

Reference: Metering service APIs - Microsoft commercial marketplace

https://docs.microsoft.com/en-us/azure/marketplace/marketplace-metering-service-apis#metered-billing-batch-usage-event

Inconsistency in request data structures for "Marketplace metered billing APIs", between managed apps and SaaS offers

  • When submitting a single event, the payload only seems to contain a resourceId, and the note says that resourceId has different meaning for SaaS app and for Managed app emitting custom meter.", being a resourceGroupID for managed apps, and the SaaS subscription GUID for SaaS.
@chgeuer
chgeuer / create_json_functionally.md
Last active November 19, 2021 22:35
Creates a JSON structure in the shell

A purely functional JSON processing pipeline using jq in bash

It starts with an empty JSON object, and each jq step in the pipeline further augments the structure. In case you want to step-by-step build up a JSON string in a shell.

How does it work

The --arg binds a string variable from bash to the jq-variable x.

The jq expression ($x | fromjson) parses the string into whatever JSON would be appropriate. So the bash variable true becomes the proper true boolean in the JSON. If we only would use $x (instead of ($x | fromjson)), the bash variable true would become the JSON string "true".