Skip to content

Instantly share code, notes, and snippets.

@w0rp
w0rp / run-backup.sh
Created December 12, 2018 13:15
Backup YouTube channels
#!/bin/bash
# Change to the directory for this script.
cd "$(dirname "$(realpath "$0")")"
if ! [ -d ve ]; then
python3 -m venv ve
fi
ve/bin/pip install -q -U youtube-dl
// Enable USB Debugging
// $ adb devices
// $ adb shell
pm uninstall -k --user 0 com.google.android.googlequicksearchbox // Google search bar and activity (this also removes google voice and "ok google" functionality)
pm uninstall -k --user 0 com.xiaomi.mipicks // Xiaomi picks
pm uninstall -k --user 0 com.android.browser // Xiaomi browser
pm uninstall -k --user 0 com.android.chrome // Google chrome
pm uninstall -k --user 0 com.google.android.apps.tachyon // Google Duo
pm uninstall -k --user 0 com.miui.bugreport // MIUI bug report
@AveYo
AveYo / .. MediaCreationTool.bat ..md
Last active July 6, 2025 18:34
Universal MediaCreationTool wrapper for all MCT Windows 10 versions - MOVED TO github.com/AveYo/MediaCreationTool.bat
@jtsiomb
jtsiomb / capsctrl.asm
Last active September 8, 2018 00:48
DOS TSR for remapping caps lock to control (see comment at the end for pre-built binaries)
; DOS caps lock -> ctrl remapper
; Author: John Tsiombikas <[email protected]>
; This program is public domain. Do whatever you like with it
; build with: nasm -o capsctrl.com -f bin capsctrl.asm
org 100h
bits 16
mov ax, 0900h
mov dx, msg
int 21h
@ThomasLeister
ThomasLeister / rspamd-whitelisting.md
Last active February 15, 2025 06:19
How to whitelist IP addresses or domains in Rspamd

Whitelist IP addresses based on pre-filter policy

/etc/rspamd/local.d/multimap.conf:

  IP_WHITELIST {
      type = "ip";
      prefilter = true;
      map = "/${LOCAL_CONFDIR}/local.d/ip_whitelist.map";
 action = "accept";
@gsarig
gsarig / wp-cli_batch_db_backup.sh
Last active January 28, 2021 15:07
Batch backup a server's WordPress databases with WP-CLI (read more at: https://www.gsarigiannidis.gr/wp-cli-batch-backup-wordpress-databases/)
#!/bin/bash
# A bash script to batch backup a server's WordPress databases with WP-CLI. It requires WP-CLI, obviously (https://wp-cli.org/).
# The script will search for all WordPress installations under a given directory and will backup their databases. You can declare more than one such directories.
# You don't have to modify the script every time you add a new site. As long as the new site is under a declared parent directory, its database will be backed up.
# After creating the file, don't forget to make it executable by doing:
# chmod +x wp-cli_batch_db_backup.sh
# Also, you might want to add this in a cron job for scheduled backups.
# Set PATH environment variable
@kaapstorm
kaapstorm / gpu_passthrough_on_trillian.rst
Last active November 5, 2023 20:34
How to configure GPU passthrough, specifically for my desktop machine, trillian

GPU Passthrough on trillian

Prepare the host

Configure primary GPU

Check that the integrated GPU is the primary GPU.

#!/usr/bin/env python3
import argparse
import sys
def pluralize(count):
return "bugs" if count > 1 else "bug"
@u17194907425
u17194907425 / Remove apps from Android.md
Last active February 26, 2020 19:39
Removing system apps on Android
@MatthewVance
MatthewVance / unbound.conf
Last active April 21, 2025 06:52
Config for running Unbound as a caching DNS forwarder (performance settings optimized for Raspberry Pi 2).
server:
###########################################################################
# BASIC SETTINGS
###########################################################################
# Time to live maximum for RRsets and messages in the cache. If the maximum
# kicks in, responses to clients still get decrementing TTLs based on the
# original (larger) values. When the internal TTL expires, the cache item
# has expired. Can be set lower to force the resolver to query for data
# often, and not trust (very large) TTL values.
cache-max-ttl: 86400