Skip to content

Instantly share code, notes, and snippets.

# These affect ONLY the runner-manager
envVars:
- name: HTTP_PROXY
value: http://proxy.example.internal:3128
- name: HTTPS_PROXY
value: http://proxy.example.internal:3128
# Critically: keep Kubernetes out of the proxy.
- name: NO_PROXY
value: "localhost,127.0.0.1,10.96.0.1,.svc,.cluster.local"
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: gitlab-runner
namespace: argocd
spec:
project: default
destination:
server: https://kubernetes.default.svc
gitlabUrl: https://gitlab.example.com
concurrent: 10
rbac:
create: true
runners:
secret: gitlab-runner-token
@daemonfire300
daemonfire300 / gist:f7a4aad01ccfe638846ce3a43f9d9184
Last active September 9, 2026 12:55
sample-nix-in-a-container.yaml
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: devcontainer
labels:
app: devcontainer
spec:
serviceName: devcontainer
replicas: 1
selector:
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: devcontainer
labels:
app: devcontainer
spec:
serviceName: devcontainer
replicas: 1
selector:
{
config,
pkgs,
lib,
...
}:
{
imports = [
./hardware-configuration.nix
{
description = "Minimal NixOS VM install with disko";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11";
disko.url = "github:nix-community/disko/latest";
disko.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = { self, nixpkgs, disko, ... }: {
{ ... }:
{
disko.devices = {
disk.main = {
type = "disk";
device = "/dev/sda"; # Proxmox: scsi0 = sda
content = {
type = "gpt";
partitions = {
ESP = {
@daemonfire300
daemonfire300 / pingpong.sh
Last active March 20, 2025 10:13
Pod Ping Pong
#!/bin/sh
NS=$1
# Delete existing pods and services if they exist
kubectl -n $NS delete pod pod1 pod2 --ignore-not-found
kubectl -n $NS delete service pod1-svc pod2-svc --ignore-not-found
# Create services
kubectl -n $NS create service clusterip pod1-svc --tcp=8080:8080 --dry-run=client -o yaml | kubectl set selector --local -f - 'run=pod1' -o yaml | kubectl -n $NS apply -f -
kubectl -n $NS create service clusterip pod2-svc --tcp=8080:8080 --dry-run=client -o yaml | kubectl set selector --local -f - 'run=pod2' -o yaml | kubectl -n $NS apply -f -
@daemonfire300
daemonfire300 / example.py
Created February 27, 2025 15:17
Minio STS Sample in Python without RoleArn
import requests
def make_post_request(base_url, action, duration_seconds, web_identity_token, version):
# Define the URL and query parameters
url = base_url
params = {
"Action": action,
"DurationSeconds": duration_seconds,
"WebIdentityToken": web_identity_token,
"Version": version