Skip to content

Instantly share code, notes, and snippets.

View e-minguez's full-sized avatar
😅
I have no idea what I'm doing

Eduardo Mínguez e-minguez

😅
I have no idea what I'm doing
View GitHub Profile
ioreg -l -d 1 -w 0 | grep "kCGSSessionSecureInputPID" | awk -F'"kCGSSessionSecureInputPID"=' '{split($2,a,","); print a[1]}' | xargs -I {} ps -p {} -o comm=
@e-minguez
e-minguez / kbbrigthness
Created September 23, 2025 13:10
kbbrightness on omarchy with macbook
# #!/usr/bin/env bash
# Based on
# https://wiki.archlinux.org/title/Hyprland#Keyboard_backlight_notifications
# Save it as ~/.config/hypr/scripts/kbbacklight
# Then used the following bindings
# bindeld = , code:238, Keyboard brightness up, exec, ~/.config/hypr/scripts/kbbacklight --inc
# bindeld = , code:237, Keyboard brightness down, exec, ~/.config/hypr/scripts/kbbacklight --dec
iDIR="$HOME/.config/mako/icons"
---
apiVersion: helm.cattle.io/v1
kind: HelmChart
metadata:
namespace: kube-system
name: longhorn-crd
spec:
targetNamespace: longhorn-system
createNamespace: true
version: 105.1.0+up1.7.2
@e-minguez
e-minguez / rancher-image-sizes.sh
Last active December 17, 2024 14:40
Get image sizes before downloading them
#!/bin/bash
set -euo pipefail
list="rancher-images.txt"
source_registry=""
usage() {
echo "USAGE: $0 [--image-list rancher-images.txt]"
echo " [-s|--source-registry] source registry to pull images from in registry:port format."
echo " [-l|--image-list path] text file with list of images; one image per line."
echo " [-h|--help] Usage message"
@e-minguez
e-minguez / example.sh
Created December 5, 2024 14:20
Get the list of occurences on a word in bash running on a container.
podman run -it --rm registry.opensuse.org/opensuse/leap:latest /bin/bash -c $'
word="example"
script_content=$(cat "/proc/$$/cmdline" | xargs -0)
count=$(echo "$script_content" | grep -ow "$word" -c)
echo "${count}"
'
@e-minguez
e-minguez / which_tag_is_latest.sh
Last active May 14, 2025 10:53
Small script to find which tag is the real latest one
#!/bin/bash
IMAGE="registry.opensuse.org/opensuse/busybox"
OS="linux"
ARCH="amd64"
PLATFORM="${OS}/${ARCH}"
LATEST=$(crane digest ${IMAGE}:latest --platform ${PLATFORM})
@e-minguez
e-minguez / extramanifest.yaml
Last active November 11, 2024 13:05
metallb and endpoint copier operator
---
apiVersion: v1
kind: Namespace
metadata:
name: metallb-system
spec: {}
---
apiVersion: v1
kind: Namespace
metadata:
getvmip(){
for vm in $(virsh list --name); do echo "${vm} $(virsh --connect qemu:///system domifaddr ${vm} | awk '/ipv4/ NF>1{print $NF}' | cut -d/ -f1)"; done
}
Sourcing python-remove-tests-dir-hook
Sourcing python-catch-conflicts-hook.sh
Sourcing python-remove-bin-bytecode-hook.sh
Sourcing setuptools-build-hook
Using setuptoolsBuildPhase
Using setuptoolsShellHook
Sourcing pip-install-hook
Using pipInstallPhase
Sourcing python-imports-check-hook.sh
Using pythonImportsCheckPhase
@e-minguez
e-minguez / unlock.sh
Created November 6, 2022 16:24
Unlock plasma vaults using GUI
#!/bin/bash
export PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/home/deck/.local/share/flatpak/exports/bin:/var/lib/flatpak/exports/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/home/deck/.local/bin
PASS=$(zenity --title Vault --password)
for vault in ~/Vaults/*; do
gocryptfs -idle 5m --extpass "echo ${PASS}" ~/.local/share/plasma-vault/$(basename ${vault}).enc ${vault}
done
/usr/bin/flatpak run --branch=stable --arch=x86_64 --command=/app/bin/chrome --file-forwarding com.google.Chrome @@u %U @@
/usr/bin/flatpak run --branch=stable --arch=x86_64 --command=nextcloud --file-forwarding com.nextcloud.desktopclient.nextcloud