Skip to content

Instantly share code, notes, and snippets.

View bad ip's iptables.md

#bad users/computers/hacks/warez/shit

iptables -A INPUT -s 188.166.242.233 -j DROP
iptables -A INPUT -s 188.166.217.243 -j DROP
iptables -A INPUT -s 174.138.30.38 -j DROP
iptables -A INPUT -s 165.22.247.172 -j DROP
iptables -A INPUT -s 167.71.195.239 -j DROP
iptables -A INPUT -s 139.59.247.248 -j DROP
iptables -A INPUT -s 139.59.235.100 -j DROP
iptables -A INPUT -s 165.22.251.215 -j DROP
@bruvv
bruvv / fixsleep.md
Last active August 9, 2020 15:38
Fix iMac with fusion drives not sleeping
View fixsleep.md

Create bootscript.sh:

#!/bin/bash
# make sure to run this program as root and make it run at boot
ps -ef | grep UserEventAgent | grep -v grep | awk '{print $2}'| sudo xargs kill sleep 15
ps -ef | grep UserEventAgent | grep -v grep | awk '{print $2}'| sudo xargs kill sleep 15
ps -ef | grep UserEventAgent | grep -v grep | awk '{print $2}'| sudo xargs kill sleep 15
@bruvv
bruvv / gist:3075b64b0aa90139ab1be3223c367ccd
Last active November 29, 2020 00:04
synology lets encrypt wildecard auto renewal.sh
View gist:3075b64b0aa90139ab1be3223c367ccd
#!/bin/bash
# 1. replace "site.nl" with your domain name
# 2. schedule this script to be run once per three months in Task Scheduler
echo "======================================================================"
echo "Certificate Renewal"
echo "======================================================================"
./acme.sh --force --renew -d *.site.nl --dns --yes-I-know-dns-manual-mode-enough-go-ahead-please --log
echo ""
@bruvv
bruvv / chromecast.xml
Created March 30, 2018 13:26
Chromecast Ultra profile for plex 2018 (4k support)
View chromecast.xml
<?xml version="1.0" encoding="utf-8"?>
<Client name="Chromecast">
<TranscodeTargets>
<VideoProfile protocol="http" container="matroska" codec="h264,h265,hevc" audioCodec="eac3,ac3,aac,mp3" context="streaming" />
<VideoProfile protocol="http" container="mkv" codec="h264,h265,hevc" audioCodec="eac3,ac3,aac,mp3" context="streaming" />
<VideoProfile protocol="http" container="mp4" codec="h264,h265,hevc" audioCodec="eac3,ac3,aac,mp3" context="streaming" />
<MusicProfile container="matroska" codec="mp3" />
<MusicProfile container="mkv" codec="mp3" />
<PhotoProfile container="jpeg" />
<SubtitleProfile container="ass" codec="ass" />
View unbound.conf
server:
module-config: "subnetcache validator iterator"
chroot: "/usr/local/etc/unbound"
directory: "/usr/local/etc/unbound"
username: "unbound"
port: 5353
do-ip4: yes
do-ip6: no
do-udp: yes
do-tcp: yes
View synology wildcard https ssl certificate.md

We are going to use the acme.sh script to accomplish this. For authentication of the domain name, we will use the DNS option. First login to your Synology with ssh as the admin user and then sudo -i to get root access. When you login into the Synology with ssh you will end up in the /root path. I assume for the rest of the guide we run everything from that path. Now we need to get the script and change the permissions so it is executable.

wget https://raw.githubusercontent.com/Neilpang/acme.sh/master/acme.sh
chmod a+x acme.sh

Next we issue the certificate:

./acme.sh --issue -d *.website.come --dns --yes-I-know-dns-manual-mode-enough-go-ahead-please
View iptables.sh
#!/bin/bash
# flush the nat and mangle tables, flush all chains (-F), and delete all non-default chains (-X)
iptables -F
iptables -X
iptables -t mangle -F
ip6tables -X
ip6tables -t mangle -F
ip6tables -F
# accept all
@bruvv
bruvv / linux_commands.md
Last active April 9, 2021 16:45
Linux wordlist commands for WPA/WPA2 hash
View linux_commands.md

Merging

rm -f stage*
rm -vf CREADME CHANGELOG* readme* README* stage*
echo "Number of files:" `find . -type f | wc -l`
cat * > tmp/aio-"${PWD##*/}".lst 
rm -f *.txt && mv tmp/aio-"${PWD##*/}".lst ./
View test
docker ps -q | xargs -n 1 docker inspect --format '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}} {{ .Name }}' | sed 's/ \// /'
@bruvv
bruvv / run.py
Created July 18, 2021 10:39
download csv convert to HTML
View run.py
import os
import requests
from datetime import datetime
# set environment variables
os.environ['USERNAME'] = 'python-demo'
os.environ['PASSWORD'] = 'claw30_bumps'
city = 'http://rachel.maykinmedia.nl/djangocase/city.csv'
hotel = 'http://rachel.maykinmedia.nl/djangocase/hotel.csv'