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 / CORS
Last active December 23, 2020 14:16
NGINX config for pi-hole
if ($request_method = 'OPTIONS') {
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
#
# Custom headers and headers various browsers *should* be OK with but aren't
#
add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range';
#
# Tell client that this pre-flight info is valid for 20 days
#
@jult
jult / nc_update.sh
Last active February 26, 2021 11:51
nextcloud update and post-update occ commands, file and database integrity fixes
#!/bin/bash
find /etc -type f -name "php.ini" -exec sed -i 's/output_buffering/;output_buffering/g' {} +
sudo -u www-data sed -i "s/output_buffering=.*/output_buffering='Off'/" /var/www/nextcloud/.user.ini
sudo -u www-data php /var/www/nextcloud/occ app:disable survey_client
sudo -u www-data php /var/www/nextcloud/occ app:disable firstrunwizard
sudo -u www-data php /var/www/nextcloud/occ app:enable admin_audit
sudo -u www-data php /var/www/nextcloud/occ app:enable files_pdfviewer
sudo -u www-data php /var/www/nextcloud/occ maintenance:mode --on
nohup chown -R www-data:www-data /var/www/nextcloud &
@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 / 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 / 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"