Skip to content

Instantly share code, notes, and snippets.

View nukhes's full-sized avatar
🇧🇷

Pedro Henrique nukhes

🇧🇷
  • ETEC
  • BR
  • 08:46 (UTC -03:00)
View GitHub Profile
@nukhes
nukhes / install_flatpak.sh
Created January 17, 2026 15:39
Distribution-agnostic tool designed to deploy the Flatpak across multiple Linux environments silently.
#!/bin/bash
if [[ $EUID -ne 0 ]]; then
exit 1
fi
declare -A os_map=(
["apt"]="apt install -qq -y flatpak"
["dnf"]="dnf install -y -q flatpak"
["pacman"]="pacman -S --noconfirm --needed --quiet flatpak"
@nukhes
nukhes / install_psd.sh
Created January 12, 2026 13:40
Compile Profile-sync-daemon from source and install it with stow.
#!/bin/bash
# This script compile Profile-sync-daemon from source and install it with stow.
# To uninstall run 'sudo stow -D /usr/local/stow/psd'.
# Support Fedora, Arch and Debian/Ubuntu based distros.
# Despite that, you can run this in any Linux distro with stow installed.
# Install stow if missing
command -v stow >/dev/null && echo "Stow is already installed" || { echo "Installing Stow..."; (command -v apt >/dev/null && sudo apt update && sudo apt install -y stow) || (command -v dnf >/dev/null && sudo dnf install -y stow) || (command -v pacman >/dev/null && sudo pacman -S --noconfirm stow); }
# Cleanup older install
@nukhes
nukhes / optimize_firefox.sh
Last active January 16, 2026 18:14
Automates the hardening and optimization of Firefox on any Linux distribution, using Firefox's Enterprise Policy Engine to inject system-wide configurations. (This script deletes cookies; use at your own risk)
#!/bin/bash
# Ensure the script is run as root
if [ "$EUID" -ne 0 ]; then
echo "Please run as root (sudo)"
exit 1
fi
# Define the target directory for Firefox system-wide policies
POLICY_DIR="/etc/firefox/policies"
@nukhes
nukhes / lsfg-vk.sh
Last active January 3, 2026 21:22
Install lsfg-vk on Linux systems with an alternative version of Lossless Scaling.
#!/bin/bash
# Install lsfg-vk on Linux systems with an alternative version of Lossless Scaling, without the need to purchase it.
# Supports every Linux x86_64 machine
DOWNLOAD_URL="https://github.com/PancakeTAS/lsfg-vk/releases/download/v1.0.0/lsfg-vk-1.0.0.x86_64.tar.zst"
TEMP_FILE="/tmp/lsfg_install.tar.zst"
INSTALL_DIR="/"
# Install LSFG-VK Release
@nukhes
nukhes / speedup.sh
Created December 30, 2025 20:14
Speed up Steam's Shader in Linux Machines.
#!/bin/bash
# This script optimizes Steam's background shader compilation by automatically configuring the steam_dev.cfg file
# to use your total CPU threads minus four, a calculation designed to maximize processing speed while reserving
# enough resources to prevent system freezes. It functions idempotently, meaning it first checks if the configuration
# file exists (creating it if necessary) and then uses sed to either update the existing unShaderBackgroundProcessingThreads
# line or append it if missing.
CONFIG_FILE="$HOME/.local/share/Steam/steam_dev.cfg"
TOTAL_THREADS=$(nproc)
TARGET_THREADS=$((TOTAL_THREADS - 4))
@nukhes
nukhes / dropbox_headless.sh
Last active January 17, 2026 15:26
Dropbox Headless Install via command line (Dropbox daemon is compatible with 64-bit Linux machines).
cd ~ && wget -O - "https://www.dropbox.com/download?plat=lnx.x86_64" | tar xzf -
chmod +x ~/.dropbox-dist/dropboxd
# Autostart Setup
cat > ~/.config/autostart/dropbox-manual.desktop <<EOF
[Desktop Entry]
Type=Application
Name=Dropbox Daemon
Comment=Manual Autostart for ~/.dropbox-dist/dropboxd
Exec=$HOME/.dropbox-dist/dropboxd
@nukhes
nukhes / install_gpt4all.sh
Last active December 5, 2025 17:27
Instala o GPT4All no Ubuntu 24.04 LTS (funciona em Distrobox também).
#!/bin/bash
# estes pacotes são vitais pra interface funcionar
sudo apt update -y
sudo apt install -y libopengl0 wget libxkbcommon-x11-0 libxcb-shape0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-render-util0 libxcb-xinerama0 libxcb-xinput0
wget https://gpt4all.io/installers/gpt4all-installer-linux.run
chmod +x ./gpt4all-installer-linux.run
./gpt4all-installer-linux.run
@nukhes
nukhes / ssh_setup
Created November 26, 2025 09:47
Enviar copia de sua chave SSH automáticamente pra um server ou VM
```
ssh-keygen -t rsa
type $env:USERPROFILE\.ssh\id_rsa.pub | ssh usuario@IPADDRESS "mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys"
```
Permissões dentro da VM
```bash
chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys
```
@nukhes
nukhes / lockvital.sh
Created October 27, 2025 16:45
Hold updates for vital parts of Ubuntu/Linux
sudo apt-mark hold "grub-*" "grub2*" "linux-generic*" "linux-headers-generic*" "linux-image-generic*" "linux-signed-generic*" "linux-signed-image-generic*" linux-firmware intel-microcode amd64-microcode
@nukhes
nukhes / debloat.sh
Created October 27, 2025 01:50
Debloat Linux Mint 22.1 XFCE
sudo apt update -y && sudo apt remove --purge -y *thunderbird* libreoffice* celluloid sticky *calendar* cmatrix hypnotix rhythmbox *yaru* *papirus* && sudo apt autopurge -y