Skip to content

Instantly share code, notes, and snippets.

View thomast1906's full-sized avatar

Thomas Thornton thomast1906

View GitHub Profile
@thomast1906
thomast1906 / AI-HMCTS-usage-Jan-2024.csv
Created January 9, 2024 13:20
AI-HMCTS-usage-Jan-2024.csv
cloud_RoleName itemType Column1
ccd-definition-store-api dependency 67022
ccd-data-store-api dependency 61123
WA Task Management dependency 28836
ccd-data-store-api trace 25571
am-role-assignment-service dependency 25071
dependency 20966
ccd-data-store-api exception 20647
am-role-assignment-service trace 19771
Web request 18038
name: $(BuildDefinitionName)_$(date:yyyyMMdd)$(rev:.r)
parameters:
- name: tests
type: object
default: ['example1', 'example2']
stages:
- ${{ each test in parameters.tests }}:
- stage: thomas_${{test }}
@thomast1906
thomast1906 / AI-HMCTS-usage-Oct-2023.csv
Created October 31, 2023 13:31
AI-HMCTS-usage-Oct-2023.csv
cloud_RoleName itemType Column1
ccd-data-store-api dependency 199156
ccd-definition-store-api dependency 94736
WA Task Management dependency 92503
ccd-data-store-api exception 88235
ccd-data-store-api trace 86003
Web request 77162
am-role-assignment-service dependency 77111
am-role-assignment-service trace 64144
ccd-api-gateway dependency 62914
@thomast1906
thomast1906 / AI-HMCTS-usage-Sept-2023.csv
Last active September 25, 2023 11:44
AI-HMCTS-usage-Sept-2023.csv
cloud_RoleName itemType Column1
ccd-data-store-api dependency 45901
dependency 22015
WA Task Management dependency 21557
ccd-data-store-api exception 20147
ccd-data-store-api trace 19988
am-role-assignment-service dependency 18308
Web request 17836
am-role-assignment-service trace 14977
ccd-api-gateway dependency 14811
brew install python
echo 'export PATH="$(brew --prefix)/opt/python@3/libexec/bin:$PATH"' >> ~/.zshrc
export PATH=/usr/local/bin:/usr/local/sbin:~/bin:$PATH
#thanks to https://stackoverflow.com/questions/5157678/how-do-i-use-brew-installed-python-as-the-default-python/70683186#70683186
terraform {
required_version = ">= 1.0.10"
backend "azurerm" {
}
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = "2.82.0"
}
@thomast1906
thomast1906 / gist:15c5040ba48328c443f3c8df3dd0ff32
Last active October 13, 2021 18:06
Conditional variable of a variable in Azure DevOps Pipeline
variables:
- name: project
value: tamops
- name: teamName
${{ if eq( variables['project'], 'tamops') }}:
value: "alpha"
${{ if eq( variables['project'], 'preproduction' ) }}:
value: "beta"
${{ if notIn( variables['project'], 'tamops', 'preproduction') }}:
value: "charlie"
@thomast1906
thomast1906 / keyvault-secret-copy.sh
Last active May 12, 2021 19:11
Copy Azure KeyVault secrets to another KeyVault using Azure CLI
#!/bin/bash
SOURCE_KEYVAULT="<SOURCE KEYVAULT THAT YOU WANT TO COPY SECRETS FROM>"
DESTINATION_KEYVAULT="<DESTINATION KEYVAULT THAT YOU WILL COPY SECRETS TO>"
SECRETS+=($(az keyvault secret list --vault-name $SOURCE_KEYVAULT --query "[].id" -o tsv))
for SECRET in "${SECRETS[@]}"; do
SECRETNAME=$(echo "$SECRET" | sed 's|.*/||')