Skip to content

Instantly share code, notes, and snippets.

View dhensen's full-sized avatar
👋

Dino Hensen dhensen

👋
View GitHub Profile
"""The following command checks which packages have a dependency on a given package checking through all packages even though not installed locally:
pacman -Sii nodejs-lts-gallium | grep "Req" | sed -e 's/Required By : //g'
This returns a string of packages separated by spaces and some prefix.
This script does the same thing but then in python and tells you which packages you currently have installed of those.
THis is inspired by getting "warning: removing 'nodejs' from target list because it conflicts with 'nodejs-lts-gallium'" why trying to run pacman -Syu today.
The warning does not help, it should tell me where the warning is coming from.
This script told me that apm was the culprit (turned out to be implicitly installed for atom) I dont use atom, so removed atom along with all its dependencies. problem solved.
@dhensen
dhensen / cleanup_nmcli_connections.sh
Created June 27, 2022 21:42
Remove all nmcli connections except one
nmcli -f name connection show | grep -Ev 'Tatooine5G|NAME' | sed -e 's/[[:space:]]*$//' | tr '\n' '\0' | xargs -0 -n1 nmcli connection delete
@dhensen
dhensen / pp.sh
Created January 28, 2025 23:38
Script that prints scaling driver, governor and EPP hint currently being used. I only care about cpu0.
#!/bin/bash
set -x
# Scaling driver
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_driver
# for example: amd-pstate-epp
# Scaling governor
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
@dhensen
dhensen / get-neovim-stable.sh
Last active August 20, 2025 22:24
I use this to compile and install latest stable neovim on my raspberry pi zero w
#!/usr/bin/env bash
# Run this: curl -fsSL https://gist.githubusercontent.com/dhensen/848b1bf838fa9574751bb2c3971c4d19/raw/get-neovim-stable.sh | bash
git clone https://github.com/neovim/neovim --depth 1 -b stable
cd neovim
sudo apt-get install -y ninja-build gettext cmake curl build-essential git
make CMAKE_BUILD_TYPE=RelWithDebInfo
PKG_ARCH=$(uname -m)
cd build && sudo cpack -G DEB && sudo dpkg -i nvim-linux-$PKG_ARCH.deb