Skip to content

Instantly share code, notes, and snippets.

@chrismckelt
chrismckelt / solar-datasheet-search-for-llm-analysis.py
Created October 1, 2024 23:00
search CEC solar inverters on google, download datasheets for LLM combined dataset analysis
# https://cer.gov.au/node/4571
# script to import a CSV file,
# from the second row,
# combine the first three columns into a single string.
# For each result,
# search on google using the specific term, only return PDF results.
# Print the results and download the PDFs to a specific folder.
# USAGE: python3 ./search-for-device-capabilities.py
@chrismckelt
chrismckelt / DotNetXtdbConnector.cs
Created August 8, 2024 09:06
C# XTDB Connector
public abstract class AbstractXtdb
{
public Dictionary<string, object> ToJsonLd(object obj)
{
if (obj is DateTime dateTime)
{
return new Dictionary<string, object>
{
["@value"] = dateTime.ToString("o"),
@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 / 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 / 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 / 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?
@chrismckelt
chrismckelt / Impersonation.cs
Created June 6, 2021 00:30
Impersonation.cs
using System;
using System.Runtime.InteropServices;
using System.Security.Permissions;
using System.Security.Principal;
namespace ExampleNameSpace
{
public class Impersonation : IDisposable
{