Skip to content

Instantly share code, notes, and snippets.

@chrismckelt
chrismckelt / cosmos-queries.kql
Last active March 14, 2024 01:36
Cosmos DB Queries
// Consumed RU/s in last 24 hours
// Identify consumed RU/s on Cosmos databases and collections.
// To create an alert for this query, click '+ New alert rule'
//You can compare the RU/s consumption with your provisioned RU/s to determine if you should scale up or down RU/s based on your workload.
AzureDiagnostics
| where Category == "DataPlaneRequests"
//| where collectionName_s == "CollectionToAnalyze" //Replace to target the query to a collection
| summarize ConsumedRUsPerMinute = sum(todouble(requestCharge_s)) by collectionName_s, _ResourceId, bin(TimeGenerated, 1m)
| project TimeGenerated , ConsumedRUsPerMinute , collectionName_s, _ResourceId
| render timechart
@chrismckelt
chrismckelt / cloud-workload-modernisation-strategy.drawio
Last active November 13, 2023 13:11
Cloud Workload Modernisation Strategy
graph LR;
note1[Retire = to be removed]
style note1 fill:#fff, color:#788A75, stroke:#75788A
note2[Sweat = Lifetime < 1 year]
style note2 fill:#fff, color:#788A75, stroke:#75788A
note3[Maintain = Lifetime > 1 year]
style note3 fill:#fff, color:#788A75, stroke:#75788A
note4[Invest = Lifetime > 1 year]
style note4 fill:#fff, color:#788A75, stroke:#75788A
@chrismckelt
chrismckelt / mac-hyper-v-bios-fix.txt
Created April 14, 2018 10:40
MAC Hyper V Virtualization ON in bios on boot
http://nuts4.net/post/hack-force-vt-x-to-be-always-on-when-booting-to-windows-on-your-macbook
HACK: Force VT-x to be always on when booting to Windows on your MacBook
05 APRIL 2016 JOE
Warning: While this worked on my 15" MacBook Pro (mid 2014, EMC 2881), and newer models based on the comments below, this messes with the Model Specific Registers on your Intel processor. Also, this WILL NOT WORK on AMD-based systems...should Apple ever release one. Before proceeding, ensure that rEFInd is supported for your specific Mac/processor. By following any of the steps outlined below, you agree to not hold me liable for any damages. You've been warned!
Ok, if you're at this point, you've agreed to chance fate. So, I got fed up that Apple's UEFI BIOS doesn't set VT-x enabled by default when a Boot Camp partition is started by default. Having to boot into OS X, then reboot into Windows just so I can use Hyper-V/Docker is a huge time suck, and a bit ridiculous.
I sat out to find a solution, and had a hard time d
@chrismckelt
chrismckelt / role-integration.md
Created June 29, 2023 12:20
Senior Integration Engineer/Architect

Overview

As part of the product engineering team this role is to design, implement and maintain the integrations between key systems that facilitate business operations. A key objective is the development and maintenance of integrations across various platforms which integrates with our key student management system.

The incumbent of this role should be capable of managing their own tasks within an agreed framework. They should be capable of working independently on a task to completion within the overall development project with minimal supervision.

Key Accountabilities:

Supports the Data Services team by:

sequenceDiagram
participant ControlM participant HiLight participant Server participant APIGateway participant Eclipse

rect rgb(250, 242, 242) ControlM->>+APIGateway: HTTP POST to API endpoint to start publishing claims workflow https://TBD/job1

@chrismckelt
chrismckelt / EndToEndTest.cs
Created March 26, 2023 21:38
Subcutaneous end to end test
using Demo.Core.ReadModels.LoanApplication;
using Demo.TestsUtility.TestAttributes;
using TestStack.BDDfy;
using Xunit;
namespace Demo.Subcutaneous.Tests.Scenarios.V2
{
[Story(
AsA = "As Scenario 1 tester",
IWant = "I want create an end to end small loan quote",
@chrismckelt
chrismckelt / DeployMaster.psm1
Last active May 25, 2022 00:53
Azure Powershell deployment commands
$ErrorActionPreference = "Stop"
$global:_subscriptionId = $null
$global:_workload = $null
$global:_workloadCore = $null
$global:_regionCode = $null
$global:_keyvault_name = $null
$global:_storageAccount = $null
$global:_storageContext = $null
$global:_storageAccountConnectionString = $null
$global:_logicAppJson = $null
@chrismckelt
chrismckelt / test.md
Last active April 27, 2022 12:51
test

graph TD A[Chris] -->|Get pills| B(Go disco) B --> C{Let me dance} C -->|One| D[pants] C -->|Two| E[poo] C -->|Three| F[fa:fa-car Car]

@chrismckelt
chrismckelt / Chocolatey-MachineSetup.ps1
Last active August 31, 2021 03:31
Chocolatey-MachineSetup.ps1
#Administrator privileges check
If (-NOT ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole(`
[Security.Principal.WindowsBuiltInRole] "Administrator"))
{
Write-Warning "You do not have Administrator rights!`nPlease run the build shell as administrator!"
exit
}
@chrismckelt
chrismckelt / ProductionIssueBugTemplate.txt
Last active June 7, 2021 13:30
Production Issue Bug Template
#### Issue Name
#### Priority high|medium|low
#### Issue Summary
- What? – What has happened with the application?
- How? – What did we click/do to produce the bug?
- Where? – Where exactly in the app did we find the bug? What is the webpage and/or server (environment)?
- Who? noticed the issue? staff ID or customer ID?