Skip to content

Instantly share code, notes, and snippets.

View dgacias's full-sized avatar

David Gacias dgacias

View GitHub Profile
@dgacias
dgacias / gist:e31b866d629f3058a79792ae3134cb29
Created September 2, 2025 10:06
Merge kubeconfig function for bash
#Add this function to your .bashrc file.
kube-merge() {
local files=(~/.kube/config ~/.kube/*.yml)
KUBECONFIG=$(IFS=:; echo "${files[*]}") kubectl config view --merge --flatten > ~/.kube/config
unset KUBECONFIG
echo "Kubeconfigs merged in ~/.kube/config"
echo "KUBECONFIG var has been unset"
echo "You can list your current contexts with: $ kubectl config get-contexts"
}
@dgacias
dgacias / autofirma.sh
Created July 1, 2025 10:03
Instalar autofirma en CachyOS
#Instalar Autofirma en CachyOS
sudo pacman -S ccid pcsc-tools opensc
sudo systemctl enable --now pcscd.service
paru -S --noconfirm --skipreview autofirma
#Una vez instalado, Para comprobar si te detecta el lector de DNIE, usa este comando (he sustituido los datos hexadecimales por "AA" por privacidad), y también debería detectar en tiempo real cuando introduces o sacas tu DNIE.
# ❯ pcsc_scan
#PC/SC device scanner