Skip to content

Instantly share code, notes, and snippets.

View nukhes's full-sized avatar
🇧🇷

Pedro Henrique nukhes

🇧🇷
  • ETEC
  • BR
  • 07:35 (UTC -03:00)
View GitHub Profile
@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 2, 2026 19:21
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
@nukhes
nukhes / overleaf_download.sh
Created September 20, 2025 21:24 — forked from MohamedElashri/overleaf_download.sh
Download all projects on overleaf all at once. #python
#!/bin/bash
now=`date +"%Y-%m-%d"`
directory=~/Documents//Overleaf/backup
outputTmpDirectory=$directory/tmp.zip
outputDirectory=$directory/$backup.zip
# To get the cookie
cookie=`python - << EOF
import re
# pip install mechanize
@nukhes
nukhes / cleanup_old_kernels.sh
Created September 13, 2025 18:52
Cleanup old kernels in Debian based systems (Ubuntu, Pop!_OS, Linux Mint).
#!/bin/bash
set -e
current=$(uname -r)
echo "Current kernel: $current"
kernels=$(dpkg --list | grep linux-image-[0-9] | awk '{print $2}')
to_remove=$(echo "$kernels" | grep -v "$current")
if [ -z "$to_remove" ]; then
@nukhes
nukhes / virtmanager.sh
Last active September 1, 2025 20:20
Setup VirtManager (KVM) in Debian based OSes.
#!/bin/bash
set -e
# Install required packages
sudo apt update
sudo apt install -y qemu-kvm libvirt-daemon-system libvirt-clients bridge-utils virt-manager
# Add current user to libvirt and kvm groups
sudo adduser "$USER" libvirt
sudo adduser "$USER" kvm