Skip to content

Instantly share code, notes, and snippets.

View ajmasia's full-sized avatar
😉
Always learning!

Antonio Masiá ajmasia

😉
Always learning!
View GitHub Profile
@ajmasia
ajmasia / amd-controller.sh
Last active December 2, 2022 10:15
AMD Controller CLI for Slimbook ProX with AMD Ryzen 7 4800H
#!/usr/bin/env bash
# AMD Ryzen 7 4800H processor profiler CLI tool for Slimbook computers
# If you use different AND processor, please review the params here https://shorturl.at/jHJ35
COLOR_OFF='\033[0m' # Text Reset
GREEN='\033[0;32m' # Green
YELLOW='\033[0;33m' # Yellow
CPU=$(cat /proc/cpuinfo | grep name | uniq | cut -d ':' -f2 | sed -r "s/^\s+//g")
# nix-env -p /nix/var/nix/profiles/system --delete-generations old
# nix-collect-garbage -d
# nix-env -p /nix/var/nix/profiles/system --list-generations
## Remove entries from /boot/loader/entries:
# sudo bash -c "cd /boot/loader/entries; ls | grep -v <current-generation-name> | xargs rm"
@ajmasia
ajmasia / install_cc_tool.sh
Last active April 11, 2021 14:45
Install cc-tool script
#!/usr/bin/env bash
CC_TOOL_DIR="$HOME/cc-tool"
packages=("autoconf" "automake" "libusb" "boost" "pkgconfig" "libtool")
function innstall_packages() {
echo "👉 adding homebrew packages"
brew services stop --all
installed_packages=()
for i in "$@"; do