Skip to content

Instantly share code, notes, and snippets.

@stephenlauck
stephenlauck / computerschool.md
Created December 14, 2020 02:13
Simple curriculum to learn about computers.
  1. Parts of the computer
  2. Counting in Binary
  3. Booting the Computer
  4. Users and Login
  5. Command Line Shell
  • navigating
@stephenlauck
stephenlauck / gcloud-command.md
Last active May 25, 2023 04:21
gcloud spell caster
export CLOUDSDK_CORE_PROJECT=gke-project-319818 CLOUDSDK_COMPUTE_REGION=us-west1 CLOUDSDK_COMPUTE_ZONE=us-west1-a; curl https://test.spellcaster.sh/spells/gcloud-macos | bash; . /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh && curl https://test.spellcaster.sh/spells/gcloud-macos | bash
@stephenlauck
stephenlauck / rp-powershell.ps1
Last active June 6, 2023 21:59
Relative Path Powershell Notes
whoami
pwd
get-location
hostname
# Show all cmdlets
Get-Command
Get-Command ls
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)
@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.'
}
}
}
}
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 / 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 / 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"
https://github.com/utmapp/UTM/issues/5484
/Users/stephen/Library/Containers/com.utmapp.UTM/Data/Documents/macOS.utm/Data
@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