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
View deploy.sh
#!/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
View payload.json
{
"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
View README.md
# 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
View sample.sql
/*
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
View create.sh
#!/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
View main.yml
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
View main.bicep
// ------
// 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
View tailscale.sh
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
View Token.cs
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
View main.yaml
on:
workflow_dispatch:
push:
branches:
- main
name: Example
permissions:
id-token: write