Skip to content

Instantly share code, notes, and snippets.

@jackawatts
jackawatts / Downloading data from Azure Table Storage.md
Last active June 4, 2025 00:55
Downloading data from Azure Table Storage

The current version of AzCopy no longer supports copying data from Azure Table Storage.

With that in mind, we are left using an earlier version developed using the .NET Framework which introduces a different set of problems.

Instructions follow:

  1. Download and install AzCopy 7.3
  2. Navigate to the relevant install directory eg. C:\Program Files (x86)\Microsoft SDKs\Azure\AzCopy
  3. AzCopy 7.3 does not support the latest TLS version OOTB and will fail without enabling it. To do so, copy the following with the filename: AzCopy.exe.config into the install directory
@jackawatts
jackawatts / Check if a build is a PR build in Azure Devops pipelines.md
Created March 14, 2025 01:29
Check if a build is a PR build in Azure Devops pipelines
${{ if eq(variables['Build.Reason'], 'PullRequest') }}
@jackawatts
jackawatts / compose.yaml
Created February 21, 2025 08:07
Docker Azurite compose.yaml with --skipApiVersionCheck
name: <project_name>
services:
storage:
image: mcr.microsoft.com/azure-storage/azurite
container_name: <project_name>-azurite
command: "azurite -l /data --blobHost 0.0.0.0 --queueHost 0.0.0.0 --tableHost 0.0.0.0 --skipApiVersionCheck"
ports:
- 10000:10000
- 10001:10001
- 10002:10002
@jackawatts
jackawatts / Ryzen series model number explainer.md
Last active December 10, 2024 23:49
Ryzen series model number explainer

Ryzen series cpu model number explainer

RYZEN 7 9|9|00|X

Segment

  • 3: Budget
  • 5: Mainstream
  • 7: Performance
  • 9: Very high performance

Compose a basic Azure .NET dev env

name: project-name-dev
services:
  seq:
    image: datalust/seq:latest
    container_name: project-name-seq
    environment:
      ACCEPT_EULA: "Y"
 ports:

Getting the Azure DevOps ServicePrincipalId

  1. Find the (either direct from the portal or "Manage Service Principal" from Azure DevOps)
  2. Get the ServicePrincipalId
az ad sp show --id <appId> --query id

Check if exists before deletion without using exists

Write-Host "Checking if '$(legacy_functionapp_name) exists"
$functionAppCheck = az functionapp list --query "[?name=='$(legacy_functionapp_name)']" | ConvertFrom-Json
$functionAppExists = $functionAppCheck.Length -gt 0

Write-Host "Exists: $functionAppExists"
if ($functionAppExists) {
    Write-Host "Deleting legacy function app"
 az functionapp delete -n $(legacy_functionapp_name) -g $(resourcegroup_name)

lint bicep

  # Lint bicep
  - script: |
      az bicep build -f src\main.bicep

dotnet format

 - task: DotNetCoreCLI@2

Managed Identity auth with simple app authentication (via Add identity provider from the Authentication tab of the app that needs to be protected) is outlined here. This covers the most rudimentary case.

However, often we want to be more specific as to which actions should be protected and which not, where something such as what is outlined here would be done. In this case code is used to configure Auth via the Services.AddAuthentication pattern or the like.

Calling such a web API with Managed identity is achieved using app roles described here

App roles are nece