Skip to content

Instantly share code, notes, and snippets.

View ljtill's full-sized avatar
🔨

Lyon Till ljtill

🔨
View GitHub Profile
@ljtill
ljtill / deploy.sh
Created January 31, 2024 11:16
Provides the ability to deploy Kubernetes Service with Application Gateway Ingress Controller
#!/usr/bin/env bash
set -e
#
# Variables
#
RESOURCE_GROUP=''
LOCATION=''
@ljtill
ljtill / payload.json
Created January 29, 2024 12:31
Provides an example of the payload sent from Application Gateway Ingress Controller to Azure Resource Manager
{
"id": "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Network/applicationGateways/resourceName",
"location": "uksouth",
"properties": {
"backendAddressPools": [
{
"id": "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Network/applicationGateways/resourceName/backendAddressPools/defaultaddresspool",
"name": "defaultaddresspool",
"properties": {
"backendAddresses": []
@ljtill
ljtill / README.md
Created January 22, 2024 16:56
Provides the ability to dump Kubernetes configuration
# Cluster Information
kubectl cluster-info > kube-cluster-info.txt

# Nodes
kubectl get nodes > kube-nodes.txt
kubectl describe nodes > kube-nodes-details.txt

# Namespaces
kubectl get namespaces > kube-namespaces.txt
@ljtill
ljtill / sample.sql
Last active April 17, 2023 10:57
Provides the ability to query Blob (object) Storage with SQL Server
/*
Encryption
*/
CREATE MASTER KEY ENCRYPTION BY PASSWORD = '';
SELECT * FROM sys.symmetric_keys;
/*
Credential
@ljtill
ljtill / create.sh
Last active March 1, 2023 17:46
Provides the ability to create / delete multiple Kubernetes clusters
#!/bin/bash
configuration=$(cat ./resources.json)
length=$(echo $configuration | jq -r ".clusters | length")
for ((i=0; i<length; i++)); do
read name location country <<< $(echo $configuration | jq -r ".clusters[$i] | [.name, .location, .country] | @tsv")
echo "=> Creating Kubernetes cluster ($country)..."
az aks create \
@ljtill
ljtill / main.yml
Last active March 1, 2023 17:49
Provides the ability to deploy to multiple Synapse workspaces
name: "Workspace Deployment"
on:
push:
branches: [ release ]
permissions:
id-token: write
contents: read
@ljtill
ljtill / main.bicep
Last active March 1, 2023 17:49
Provides the ability to run Windows 11 on Azure with Trusted Launch
// ------
// Scopes
// ------
targetScope = 'resourceGroup'
// ---------
// Resources
// ---------
@ljtill
ljtill / tailscale.sh
Last active June 7, 2023 12:38
Provides the ability to bootstrap an Azure VM with the Tailscale agent
sudo apt update
curl -fsSL https://tailscale.com/install.sh | sh
sudo tailscale up --accept-dns=false --auth-key=<REPLACE>
@ljtill
ljtill / Token.cs
Last active August 1, 2022 13:11
Provides the ability to generate an Access Token from Azure Active Directory
using System.Net;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text.Json;
var accessToken = await GetAccessTokenAsync();
async Task<string> GetAccessTokenAsync()
{
/*
@ljtill
ljtill / main.yaml
Last active August 8, 2022 08:02
Provides the ability to push container images to ACR with OpenID Connect
on:
workflow_dispatch:
push:
branches:
- main
name: Example
permissions:
id-token: write