Skip to content

Instantly share code, notes, and snippets.

View dark-vex's full-sized avatar

Daniele De Lorenzi dark-vex

  • Milan
  • 05:45 (UTC +02:00)
View GitHub Profile
@alfredopalhares
alfredopalhares / README.md
Last active November 14, 2024 10:43
Script to diff un-updatebale Statefulsets fiesl

List un-updatabale file Kubernetes Statefulset

https://kubernetes.io/docs/tutorials/stateful-application/basic-stateful-set/#updating-statefulsets

There are some cases that you might be trying to update a statefulset and you get this error:

Error: cannot patch "my-statefulset" with kind StatefulSet: StatefulSet.apps "my-statefulset" is invalid: spec: Forbidden: updates to statefulset spec for fields other than 'replicas', 'ordinals', 'template', 'updateStrategy', 'persistentVolumeClaimRetentionPolicy' and 'minReadySeconds' are forbidden && cannot patch "my-statefulset-tracking" with kind StatefulSet: StatefulSet.apps "my-statefulset-tracking" is invalid: spec: Forbidden: updates to statefulset spec for fields other than 'replicas', 'ordinals', 'template', 'updateStrategy', 'persistentVolumeClaimRetentionPolicy' and 'minReadySeconds' are forbidden

And while you can diff a file manually beteween you update and the yaml that you can fecth: kubectl -n my-ns get sts my-statefulset -o yaml

@dark-vex
dark-vex / PVE-HP-ssacli-smart-storage-admin.md
Created May 28, 2024 10:33 — forked from mrpeardotnet/PVE-HP-ssacli-smart-storage-admin.md
HP Smart Storage Admin CLI (ssacli) installation and usage on Proxmox PVE (6.x)

HP Smart Storage Admin CLI (ssacli) installation and usage on Proxmox PVE (6.x)

Why use HP Smart Storage Admin CLI?

You can use ssacli (smart storage administrator command line interface) tool to manage any of supported HP Smart Array Controllers in your Proxmox host without need to reboot your server to access Smart Storage Administrator in BIOS. That means no host downtime when managing your storage.

CLI is not as convenient as GUI interface provided by BIOS or desktop utilities, but still allows you to fully manage your controller, physical disks and logical drives on the fly with no Proxmox host downtime.

ssacli replaces older hpssacli, but shares the same syntax and adds support for newer servers and controllers.

Installation

@yorickdowne
yorickdowne / friday.md
Last active May 26, 2026 18:44
Debian 13 trixie upgrade

Debian 13 "Trixie"

To start, read the official release notes.

If your install fits into "vanilla Debian plus maybe a handful of 3rd-party repos", then this guide for a simple upgrade to Debian 13 "trixie" from Debian 12 "bookworm" can be helpful. 3rd-party repos are handled with a find command.

If you are on a fork of Debian such as RasPI OS, use their instructions, not this gist.

Note upgrade is only supported from Debian 12 to Debian 13. If you are on Debian 11, upgrade to Debian 12 first. Then once on Debian 12, you can upgrade to Debian 13.

@sbolel
sbolel / sign-previous-commits.md
Created June 21, 2023 16:48
How to sign previous commits in a PR

To sign all your commits in the Git Pull Request (PR), you can use a combination of git rebase and git commit --amend. Here are the steps:

  1. Before starting, make sure you've configured Git to use your signing key. You can do this with:

    git config --global user.signingkey YOUR_SIGNING_KEY
    git config --global commit.gpgsign true

    Replace YOUR_SIGNING_KEY with your GPG key ID.

  2. Then you need to start an interactive rebase with the parent of your first commit. If you don't know what commit that is, you can use git log to display your commit history. Once you have your commit hash, start the rebase:

@toddysm
toddysm / manual-authentication-with-acr.txt
Last active December 10, 2025 16:26
Authenticating with Azure Container Registry (ACR)
# As per the instructions at https://github.com/Azure/acr/blob/main/docs/AAD-OAuth.md
# Prep: Set env variables
registry="<USE_YOUR_REGISTRY_HERE>"
tenant="<USE_YOUR_TENANT_HERE>"
subscription="<USE_YOUR_SUBSCRIPTION_HERE>"
scope="registry:catalog:*"
# Step 1: Get AAD access token
aad_access_token=`az account get-access-token --subscription $subscription --query "accessToken" --output tsv`
echo $aad_access_token
# Step 2: Get a refresh token for ACR
@fideloper
fideloper / certbot.sh
Last active December 29, 2025 19:11
Certbot on Ubuntu, wildcard subdomains via CloudFlare DNS challenge
# Used on Ubuntu 18.04 and 20.04
# Find instructions for other OSes here: https://certbot.eff.org/instructions
# Install Certbot via Snaps
sudo snap install core; sudo snap refresh core
sudo snap install --classic certbot
sudo ln -s /snap/bin/certbot /usr/bin/certbot
# Install DNS CloudFlare plugin
sudo snap set certbot trust-plugin-with-root=ok
@a1994sc
a1994sc / cloudflared.yaml
Created November 9, 2021 03:13
cloudflared - k3s
---
apiVersion: apps/v1
#kind: Deployment
kind: DaemonSet
metadata:
name: cloudflared
namespace: ingress
labels:
group: cloudflare
spec:
INGRESS:
HELM v3: https://kubernetes.github.io/ingress-nginx
Values.yaml:
---
controller:
config:
http-snippet: |-
set_real_ip_from 173.245.48.0/20;
set_real_ip_from 103.21.244.0/22;
set_real_ip_from 103.22.200.0/22;
@lg
lg / adding-tailscale-to-edgerouter.md
Last active June 10, 2026 00:37
Add tailscale to an EdgeRouter and surviving system upgrade

Adding tailscale to an EdgeRouter (and surviving system upgrades)

I suggest you run sudo bash on all of these so you're the root user.

Installing

  1. Download tailscale and put the files in /config/. Find the latest stable or unstable version for your EdgeRouter's processor (ex. ER4 is mips and ERX is mipself)
sudo bash    # if you havent already
@superseb
superseb / k3s-etcd-commands.md
Last active May 22, 2026 19:52
k3s etcd commands

k3s etcd commands

etcd

Setup etcdctl using the instructions at https://github.com/etcd-io/etcd/releases/tag/v3.4.13 (changed path to /usr/local/bin):

Note: if you want to match th etcdctl binaries with the embedded k3s etcd version, please run the curl command for getting the version first and adjust ETCD_VER below accordingly:

curl -L --cacert /var/lib/rancher/k3s/server/tls/etcd/server-ca.crt --cert /var/lib/rancher/k3s/server/tls/etcd/server-client.crt --key /var/lib/rancher/k3s/server/tls/etcd/server-client.key https://127.0.0.1:2379/version