Skip to content

Instantly share code, notes, and snippets.

View stephenlauck's full-sized avatar

Stephen Lauck stephenlauck

View GitHub Profile
@stephenlauck
stephenlauck / silk-notes.md
Last active May 2, 2024 06:54
silk notes

build silk flex

Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://away.spellcaster.sh/spells/silk-azure?format=powershell'))

{
"Name": "Silk Flex Role",
"IsCustom": true,
"Description": "Silk Flex Resource Group Permissions",
"Actions": [
"Microsoft.Compute/virtualMachines/performMaintenance/action",
"Microsoft.Compute/images/read",
"Microsoft.Compute/disks/read",
"Microsoft.Compute/images/write",
"Microsoft.Compute/disks/write",
@stephenlauck
stephenlauck / azure-spellcaster.ps1
Last active May 1, 2024 20:38
Spellcaster Azure Example
`Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://away.spellcaster.sh/spells/silk-flex-azure?format=powershell'))`
@stephenlauck
stephenlauck / remoteManagementDarwin.md
Last active April 3, 2024 04:26
Commands to turn on remote management on Darwin mac.
sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -configure -allowAccessFor -allUsers -privs -all
sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate
sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -restart -agent -console


sudo -S /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -configure -activate -access -on -privs -all -allowaccessfor -allusers -restart -agent

https://github.com/utmapp/UTM/issues/5484
/Users/stephen/Library/Containers/com.utmapp.UTM/Data/Documents/macOS.utm/Data
@stephenlauck
stephenlauck / cilium-ippool.yaml
Last active October 29, 2023 02:04
Cilium ippool
apiVersion: "cilium.io/v2alpha1"
kind: CiliumLoadBalancerIPPool
metadata:
name: "podinfo-pool"
spec:
cidrs:
- cidr: "172.16.0.0/24"
@stephenlauck
stephenlauck / podinfo-ingress.yaml
Created October 29, 2023 02:02
Ingress for podinfo
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: basic-ingress
namespace: default
spec:
ingressClassName: cilium
rules:
- http:
paths:
@stephenlauck
stephenlauck / cwitch.md
Last active October 17, 2023 20:00
cwitch
export VM=dist-lunar-01 IMG=https://cloud-images.ubuntu.com/lunar/current/lunar-server-cloudimg-amd64.img OS=ubuntu22.04; curl https://spellcaster.sh/spells/cwitch | bash && ssh -t -i ./id_ed25519 -o StrictHostKeyChecking=no $USER@$(virsh domifaddr $VM | awk -F'[ /]+' '{if (NR>2) print $5}')
@stephenlauck
stephenlauck / Jenkinsfile
Created July 31, 2023 21:14
Simple Jenkinsfile
pipeline {
agent any
stages {
stage('Build') {
steps {
echo 'Hi, GeekFlare. Starting to build the App.'
}
}
}
}
curl https://test.spellcaster.sh/spells/aws-ssh-$(uname | tr '[:upper:]' '[:lower:]') | bash && export AWS_VM=spell-vm-01; aws ec2 wait instance-running --instance-ids $(aws ec2 describe-instances --filter Name=tag:Name,Values="${AWS_VM}" 'Name=instance-state-name,Values=[running, stopped, pending]' --query 'Reservations[*].Instances[*].InstanceId' --out text) && sleep 10 && ssh -o ConnectTimeout=20 -i ${AWS_VM}.pem ubuntu@$(aws ec2 describe-instances --filter Name=tag:Name,Values="${AWS_VM}" 'Name=instance-state-name,Values=[running, stopped, pending]' --query 'Reservations[*].Instances[*].PublicIpAddress' --out text)