Skip to content

Instantly share code, notes, and snippets.

View jult's full-sized avatar
🏠
Working from home

Julius Thyssen jult

🏠
Working from home
View GitHub Profile
@jult
jult / jbt-rules.cf
Last active March 26, 2024 23:13
SpamAssassin rules
# Put this file under /etc/spamassassin/ and run an sa-update or reload amavis etc.
#
#--------------------------------------------------
# The only RBL I trust, UCEPROTECT1 (single IP, not IP-ranges or entire ISPs) http://uceprotect.net
#--------------------------------------------------
header RCVD_IN_UCEPROTECT1 eval:check_rbl_txt('uceprotect1', 'dnsbl-1.uceprotect.net')
describe RCVD_IN_UCEPROTECT1 Listed in dnsbl-1.uceprotect.net
tflags RCVD_IN_UCEPROTECT1 net
score RCVD_IN_UCEPROTECT1 1.8
@jult
jult / blockpeers.sh
Last active March 5, 2024 07:33
blocking p2p peer snoopers and evil corp (for Tixati IP filter and such)
#!/bin/sh
# This script runs every other night at 04:56 CET on a webserver I maintain
# Results are always at: https://jult.net/block.txt ( or https://jult.net/block.txt.gz )
# And much smaller, stripped of BS; https://jult.net/bloc.txt
# For use in Tixati IP filter: https://jult.net/bloc.txt.gz !!!
# And finally a txt file with just the bold IP-ranges: https://jult.net/bl.txt (or https://jult.net/bl.txt.gz )
# Download open block-lists, unpack, filter:
curl -s https://www.iblocklist.com/lists.php | grep -A 2 Bluetack | xargs wget -qO - --limit-rate=500k | gunzip -f | egrep -v '^#' > /tmp/xbp
@jult
jult / .stglobalignore
Last active March 5, 2024 07:19
syncthing ignore file(s) .stglobalignore and .stignore
// .stglobalignore
// These prevent SyncThing from trying to sync data that's locked, constantly changing, going to be thrown out, unimportant, etc.
// Lots of conflicts/issues disappeared using these ignores, but do check to prevent major disappointment!
// *.log and *cache* are in there, just so you know.. but firefox' startupCache and offlineCache will be synced.
// Ignores are case sensitive.
// Put both .stignore and this .stglobalignore in the root of your sync folder(s) (where .stfolder resides)
$RECYCLE.BIN
$WINDOWS.~BT
@jult
jult / sysctl.conf
Last active February 19, 2024 09:52
[Debian 12 update!] sysctl config for linux server with 8 GB DDR4 RAM or more, SSD and 1Gbe (or faster) NIC
kernel.core_uses_pid = 1
kernel.domainname = your_local_domain_name
kernel.msgmax = 65535
kernel.msgmnb = 65535
kernel.pid_max = 65535
kernel.printk = 2 3 1 2
kernel.randomize_va_space = 2
kernel.shmall = 268435456
kernel.shmmax = 268435456
kernel.sysrq = 0
@jult
jult / handy.txt
Last active August 18, 2023 18:23
debian 12 bookworm minimal install base with webmin csf ( was: handy linux server admin stuff )
apt install rsyslog curl wget mc gpg htop multitail chrony nginx php-fpm rsync php-sqlite3 dnsutils unzip libio-socket-ssl-perl libcrypt-ssleay-perl git perl iptables libnet-libidn-perl libio-socket-inet6-perl libsocket6-perl ipset libwww-perl lsb-release bash debhelper apt-transport-https rsync ssh openssh-server git autoconf automake libtool build-essential flex bison software-properties-common dirmngr sudo
curl -sSL https://install.pi-hole.net | bash
apt install unbound
wget https://www.internic.net/domain/named.root -qO- | sudo tee /var/lib/unbound/root.hints
@jult
jult / %userprofile%\AppData\Roaming\youtube-dl\config.txt
Last active January 21, 2023 05:42
[ youtube-dl ] My most succesful config for all-round best codecs and quality
--no-mtime
--no-call-home
# --ignore-errors
-f "bestvideo[height>=1080]+251/bestvideo[height>=1080]+bestaudio/bestvideo[height>=720]+251/bestvideo[height>=720]+bestaudio/137+bestaudio/136+bestaudio/bestvideo+bestaudio"
# Note that I output to an MKV container, despite the fact that shitty devices will not play some files
# or still don't support Opus, it *is* the highest quality available: http://opus-codec.org/comparison/
--merge-output-format mkv
# If you need Mac compatible MP4 uncomment the following two lines instead of the ones above. It's usually a step under max quality, but this yields true mp4 files:
@jult
jult / killadobe.sh
Created November 21, 2022 16:41 — forked from CyberPunkCodes/killadobe.sh
Mac Bash script to kill Adobe Create Cloud and other processes that Adobe forces on us.
#!/bin/bash
echo "\n\n--- Killing Stupid Adobe Auto Load Crap ---\n\n"
launchctl unload -w /Library/LaunchAgents/com.adobe.AdobeCreativeCloud.plist
launchctl unload -w /Library/LaunchAgents/com.adobe.AAM.Updater-1.0.plist
echo "\n\n--- Done! ---\n\n"
@jult
jult / rc.local
Last active November 14, 2021 14:02
tweaks for a KVM guest VPS in /etc/rc.local with commands for Debian/Ubuntu linux server with enough free RAM (4GB+)
#!/bin/sh
echo never > /sys/kernel/mm/transparent_hugepage/enabled
echo noop > /sys/block/vda/queue/scheduler
echo 0 > /sys/block/vda/queue/rotational
echo 0 > /sys/block/vda/queue/rq_affinity
echo 9000 > /proc/sys/vm/dirty_expire_centisecs
echo 9000 > /proc/sys/vm/dirty_writeback_centisecs
ethtool --offload ens3 tx-checksum-ip-generic off
@jult
jult / whitelistcat.sh
Last active September 1, 2021 18:57
whitelists collection script for pihole and the likes
#!/bin/bash
wget -qO - --limit-rate=1500k https://dbl.oisd.nl/whitelist2.txt > /tmp/white
sleep 2
wget -qO - --limit-rate=1500k https://www.technoy.de/lists/whitelist.txt >> /tmp/white
sleep 2
wget -qO - --limit-rate=1500k https://raw.githubusercontent.com/raghavdua1995/DNSlock-PiHole-whitelist/master/whitelist.list >> /tmp/white
sleep 2
wget -qO - --limit-rate=1500k https://raw.githubusercontent.com/anudeepND/whitelist/master/domains/referral-sites.txt >> /tmp/white
sleep 2
@jult
jult / no_apache.sh
Created January 8, 2020 21:42
kick apache off my debian+nginx server
#!/bin/bash
apt purge apache2 apache2-bin apache2-data apache2-utils -y
apt clean all -y
apt update && apt upgrade && apt autoremove -y
apt-mark hold apache2 apache2-bin apache2-data apache2-utils
exit 0