Skip to content

Instantly share code, notes, and snippets.

View lovemycodesnippets's full-sized avatar

The New Stack lovemycodesnippets

View GitHub Profile
@lovemycodesnippets
lovemycodesnippets / gist:3ee686149d89def91b547f28116d4f97
Created May 19, 2025 20:17
Clean up associated resources after removing a Kubernetes Deployment
kubectl delete pvc <pvc-name> -n <namespace>
kubectl delete configmap <configmap-name> -n <namespace>
kubectl delete secret <secret-name> -n <namespace>
@lovemycodesnippets
lovemycodesnippets / gist:41d6f31bbe512a62bdbe8053cb63c5a7
Created May 19, 2025 20:14
Verify ReplicaSets and Pods are gone
kubectl get rs -n <namespace> | grep <deployment-name>
kubectl get pods -n <namespace> | grep <deployment-name>
@lovemycodesnippets
lovemycodesnippets / New_Group_Folder_Test.sh
Created May 5, 2025 14:46
From the TNS post on managing Linux group permissions
echo "Hello, New Stack!" > /srv/family/test
wget https://gist.githubusercontent.com/sharadregoti/6223a08ad3f52c7eee1b688aaff68c42/raw/d87e4dd0911bf0af45b33e9b3a0566d335d70efa/.env
https://gist.githubusercontent.com/sharadregoti/6223a08ad3f52c7eee1b688aaff68c42/raw/10b97b173ff3dc06a55824d504865f80cb
@lovemycodesnippets
lovemycodesnippets / passwrd.sh
Created April 29, 2025 16:39
From the TNS Post: Manage Linux Accounts
awk -F: '$3 >= 1000 && $3 < 65534 {print $1}' /etc/passwd
@lovemycodesnippets
lovemycodesnippets / gist:6df4ec05c8f5af5123569cef2d415112
Created April 10, 2025 16:27
Updated yaml file in Vacuum with new rules applied
extends: [[spectral:oas, off]]
rules:
oas3-schema: true
operation-operationId: true
operation-operationId-unique: true
operation-tag-defined: true
tag-description: true
operation-description: true
@lovemycodesnippets
lovemycodesnippets / gist:85975b282a94339969432bac65811b39
Created April 10, 2025 16:25
Turn off default rules in Vacuum
extends: [[spectral:oas, off]]
rules:
oas3-schema: true
@lovemycodesnippets
lovemycodesnippets / gist:9ebcbbb9f972805da6caec27c7ab8874
Created April 7, 2025 20:37
OpenAPI file management newsletter example
├── components
│ ├── parameters
│ │ └── EmailParameter.yaml
│ └── schemas
│ ├── NewsletterType.yaml
│ └── Subscription.yaml
├── openapi.yaml
└── paths
├── subscriptions_{email}.yaml
└── subscriptions.yaml
@lovemycodesnippets
lovemycodesnippets / crontab-01.sh
Created April 4, 2025 15:33
From the post "Unsure How to Schedule with Cron on Linux? Try one of these GUIs"
0 0 * * * /home/jack/Documents/rsync.sh > /dev/null 2>&1
@lovemycodesnippets
lovemycodesnippets / gist:58a8b4f7c86d854fa3630ddba4c0c9e0
Created March 24, 2025 15:49
From "Tutorial: Set up a Cloud Native GPU Testbed with nvKind Kubernetes"
kubectl apply -f - <<EOF
apiVersion: v1
kind: Pod
metadata:
name: cuda-vectoradd
spec:
restartPolicy: OnFailure
containers:
- name: cuda-vectoradd
image: "nvcr.io/nvidia/k8s/cuda-sample:vectoradd-cuda11.7.1-ubuntu20.04"