Skip to content

Instantly share code, notes, and snippets.

View tuxerrante's full-sized avatar
💭
Have you tried turning it off and on again?

Affinito Alessandro tuxerrante

💭
Have you tried turning it off and on again?
View GitHub Profile
@tuxerrante
tuxerrante / live-registry.sh
Created October 1, 2026 10:33
Live check for a recursive cosign verify: does imagetools inspect --raw return the registry bytes, and does cosign sign --recursive really sign every child?
#!/usr/bin/env bash
#
# Live check for a cosign signing script that verifies multi-arch
# images recursively. Stubs cannot answer two things it depends on:
#
# 1. does "docker buildx imagetools inspect --raw" return the
# registry's own bytes, so the manifest can be checked against
# the digest the ref names?
# 2. does "cosign sign --recursive" really sign every child
# manifest of an index?
@tuxerrante
tuxerrante / headroomai-macos-install.sh
Created September 4, 2026 10:33
install headroom-ai on macos
#!/bin/bash
set -e
#######################################################
# https://headroomlabs-ai.github.io/headroom/quickstart/
#######################################################
echo "=== 1. Installing / Updating headroom-ai via uv ==="
# Ensure uv is installed
if ! command -v uv &> /dev/null; then
echo "Installing uv..."
@tuxerrante
tuxerrante / proficiency-agent-graph-backtest.md
Created August 31, 2026 13:15
Proficiency latency histogram agent-graph backtest

Proficiency latency histogram: agent-graph backtest

Companion evidence for Go Internals Part 3, captured on 2026-08-31.

Delivery graph

flowchart LR
    O[Orient] --> G[Gather evidence]
 G --> P[Plan]
#!/bin/bash
set -e
# -----------------------------------------------------------------------------
# CONFIGURATION
# -----------------------------------------------------------------------------
CLUSTER="aaffinit"
RESOURCEGROUP="aro-aaffinit-rg"
CLUSTER_DOMAIN="aaffinit.com"
WORK_DIR="$HOME/dev/aro-bootstrap"
#!/bin/bash
set -euo pipefail
# ====================================================================
# CONFIGURABLE VERSIONS
# ====================================================================
GO_VERSION="1.25.3"
HELM_VERSION="3.18.6"
K9S_VERSION="0.50.16"
@tuxerrante
tuxerrante / fedora_hyprland_devops.sh
Last active April 16, 2026 17:19
fedora workstation 43 devops setup
#!/bin/bash
set -euo pipefail
# ====================================================================
# Fedora 43 Hyprland + ML4W Development Environment Setup
# https://www.fedoraproject.org/misc#everything
# ====================================================================
# Configuration Version: 2025.11.28
# This script sets up:
# - Hyprland wayland compositor with ML4W dotfiles
@tuxerrante
tuxerrante / ubuntu_vm_cleaner.sh
Last active December 18, 2024 11:28
This bash script is designed to help you free up disk space on an Ubuntu system by removing unnecessary packages, cleaning up the apt cache, pruning Docker resources, and identifying large user-installed packages.
#!/bin/bash
# Execute with sudo
echo "> Initial Disk space"
df -BM /
initial_size=$(df --block-size=M / | awk 'NR==2 {print $3}' | sed 's/M//')
apt-get autoremove --purge
# List kernels
@tuxerrante
tuxerrante / kubernetes_apis_with_curl.sh
Last active September 25, 2023 18:01 — forked from avoidik/curl.sh
Use curl instead of kubectl
#!/bin/bash
###
# download yq
#
set -ex
# https://docs.github.com/en/rest/releases/releases?apiVersion=2022-11-28#get-the-latest-release
latest_tag=$(curl -sL -H "X-GitHub-Api-Version: 2022-11-28" https://api.github.com/repos/mikefarah/yq/releases/latest |jq -r .tag_name)
@tuxerrante
tuxerrante / resource-quotas.sh
Created August 25, 2023 10:58
get all namespaces resourcequotas from kubernetes
# It could be improved to highlight quotas over 60%
# But that would require a major rework since quotas are already pre-formatted by kubectl by merging status hard/used numbers
kubectl get ns --no-headers -o=custom-columns=:.metadata.name |xargs -I {} bash -c "echo -e '\nNamespace {}'; kubectl get -n {} --no-headers resourcequotas" |sed -e "s|count/|\\n- |g" -e "s|cpu|\\n- cpu|g" -e "s|memory|\\n- memory|g" |sed "/^namespace-resource-quota/d" >/mnt/c/Users/alessandr
o.affinito/Downloads/dev-resource-quotas.log
"""
Namespace default
Namespace dev-xyz
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "generic/ubuntu2204"
memory = 6144
cpus = 4
config.vm.provider :virtualbox do |v|
v.memory = memory