Skip to content

Instantly share code, notes, and snippets.

@gmemstr
gmemstr / Pipfile
Last active February 10, 2026 14:32
Speedtest against Hetzner servers
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"
[packages]
requests = "*"
[dev-packages]
@ChrisTitusTech
ChrisTitusTech / fixlocale.sh
Created October 27, 2020 21:51
Fix Locales in any distro
#!/bin/bash
echo "LC_ALL=en_US.UTF-8" | sudo tee -a /etc/environment
echo "en_US.UTF-8 UTF-8" | sudo tee -a /etc/locale.gen
echo "LANG=en_US.UTF-8" | sudo tee -a /etc/locale.conf
sudo locale-gen en_US.UTF-8
@isaiahnixon
isaiahnixon / commands-from-video.txt
Last active October 29, 2021 23:52
Borg Automated Backups Setup - Ubuntu 18.04
mkdir bkp
sudo apt install borgbackup -y
borg init --encryption none bkp/
crontab -e
# 0 12 * * * borg create ~/bkp::Downloads-$(date '+\%m-\%d-\%Y') ~/Downloads/
tail -f /var/log/syslog | grep CRON
borg list bkp
mkdir test-extraction
cd test-extraction
borg extract ../bkp::Downloads home/e/Downloads
@daehahn
daehahn / wsl2-network.ps1
Last active September 28, 2025 12:00
WSL 2 TCP NETWORK FORWARDING
# WSL2 network port forwarding script v1
# for enable script, 'Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope CurrentUser' in Powershell,
# for delete exist rules and ports use 'delete' as parameter, for show ports use 'list' as parameter.
# written by Daehyuk Ahn, Aug-1-2020
# Display all portproxy information
If ($Args[0] -eq "list") {
netsh interface portproxy show v4tov4;
exit;
}
@dragolabs
dragolabs / ubuntu-vnc-without-monitor.md
Created April 29, 2020 20:09
Run VNC without connected monitor to ubuntu Desktop

Install Video Dummy Package

sudo apt-get install xserver-xorg-video-dummy

Create Default X Windows Configuration File

Create / Edit xorg.conf file Rename file if already exists for backup

@ahmetozer
ahmetozer / Fix-Screen-Permission-Issue-on-Windows10-WSL.md
Created April 18, 2020 13:50
Fix "Cannot make directory '/run/screen': Permission denied" error

I applied permission to /run/screen folder but every restart requires this fix. So I change the SCREENDIR to home folder. To fix for all users at WSL run below command.

echo 'export SCREENDIR="$HOME/.screen"'

if you start screen outside of bash like command line or scheduled task run with environment variables.

C:\Users\ahmet>bash -c 'SCREENDIR=$HOME/.screen screen'
@rikka0w0
rikka0w0 / pxe_tftp_openwrt.md
Last active March 17, 2026 18:15
PXE on OpenWrt with a different TFTP server

In this configuration, DHCP will run on the OpenWrt Box, while the TFTP server (the one serves the boot files) runs on a different computer.

1. Add to /etc/config/dhcp on OpenWrt Box

config boot linux
        option filename 'pxelinux.0'
        option serveraddress '192.168.?.?'
        option servername '?'
@woblerr
woblerr / README.md
Created December 12, 2019 14:01
Docker containers logs clearing script

Docker containers logs clearing script

chmod +x ./clear_docker_container_logs.sh

Usage

Usage: ../clear_docker_container_logs.sh [-c ""]
@qzm
qzm / aria2.conf
Last active February 19, 2026 16:17
Best aria2 Config
### Basic ###
# The directory to store the downloaded file.
dir=${HOME}/Downloads
# Downloads the URIs listed in FILE.
input-file=${HOME}/.aria2/aria2.session
# Save error/unfinished downloads to FILE on exit.
save-session=${HOME}/.aria2/aria2.session
# Save error/unfinished downloads to a file specified by --save-session option every SEC seconds. If 0 is given, file will be saved only when aria2 exits. Default: 0
save-session-interval=60
# Set the maximum number of parallel downloads for every queue item. See also the --split option. Default: 5
@ianmacs
ianmacs / rpi4.boot-from-sd-rootfs-on-usb.md
Last active January 1, 2022 17:24 — forked from lucabelluccini/rpi4.boot-from-sd-rootfs-on-usb.md
Raspberry Pi 4 - Boot from SD, Rootfs on USB

Raspberry 4B - Boot from SD and rootfs on USB

  1. Download Raspbian from the official site

  2. Flash it to the USB drive following the procedure detailed here

  3. Fomat an SD Card 2/4 GB as FAT32, label "boot", flag "lba". Generate a UUID. You can use GParted for this task.

  4. Get the UUID of the USB drive and the SD Card partitions using sudo blkid.