Skip to content

Instantly share code, notes, and snippets.

# VPN Namespace
# Uploaded to Gist by JimboMonkey1234
OS: Arch Linux
VPN: PIA/Mullvad
Requires: openvpn, openvpn-update-resolv-conf
Goals:
1) Force Deluge to use a VPN while leaving all other programs unaffected
2) Introduce a killswitch to prevent Deluge from using anything other than the VPN
@mgaulton
mgaulton / badips-ipset.sh
Created June 6, 2018 15:43 — forked from JadedDragoon/badips-ipset.sh
A script to create and update an ipset with ip addresses retrieved from the badips.com blacklist. (With just a little effort should work with url to any source of IPs separated by newlines)
#!/bin/bash
# Script for blocking IPs which have been reported to www.badips.com
# via ipsets.
#
# - THIS SCRIPT DOES NOT BLOCK ANYTHING -
# This script only updates ipsets with applicable data from
# badips.com. Actually blocking the ips in that ipset is left
# up to the user (so that you may do so however you prefer).
#
# Additionally, this script does not persist the ipsets through
@mgaulton
mgaulton / badips-ipset.sh
Created June 6, 2018 15:43 — forked from JadedDragoon/badips-ipset.sh
A script to create and update an ipset with ip addresses retrieved from the badips.com blacklist. (With just a little effort should work with url to any source of IPs separated by newlines)
#!/bin/bash
# Script for blocking IPs which have been reported to www.badips.com
# via ipsets.
#
# - THIS SCRIPT DOES NOT BLOCK ANYTHING -
# This script only updates ipsets with applicable data from
# badips.com. Actually blocking the ips in that ipset is left
# up to the user (so that you may do so however you prefer).
#
# Additionally, this script does not persist the ipsets through
3702662-2017-11-02 14:17:48,858::DEBUG::[downloader:287] Delaying
3702720-2017-11-02 14:17:48,858::DEBUG::[downloader:287] Delaying
3702778-2017-11-02 14:17:48,859::DEBUG::[downloader:287] Delaying
3702836-2017-11-02 14:17:48,859::DEBUG::[downloader:287] Delaying
3702894-2017-11-02 14:17:48,871::DEBUG::[downloader:287] Delaying
3702952-2017-11-02 14:17:48,871::DEBUG::[downloader:287] Delaying
3703010-2017-11-02 14:17:48,871::DEBUG::[downloader:287] Delaying
3703068-2017-11-02 14:17:48,871::DEBUG::[downloader:287] Delaying
3703126-2017-11-02 14:17:48,871::DEBUG::[downloader:287] Delaying
3703184-2017-11-02 14:17:48,872::DEBUG::[downloader:287] Delaying
@mgaulton
mgaulton / postfix-modify-header
Created August 19, 2016 20:55 — forked from eegrok/postfix-modify-header
Modify the to: header in postfix
# so recently I had an issue where I wanted to send email sent to a local user root (from logwatch, e.g.) to a different email address
# simple enough -- just add a ~root/.forward file, with the contents root-handler-testing@gmail.com
# all the email gets sent there...
# but the email shows up with a to: header of root@my-example-machine.com
# what I really want is the to: header to be root-handler-testing@gmail.com
# so I can filter emails, etc... below is how to do that.
#uncomment the following line in /etc/postfix/main.cf
#header_checks = regexp:/etc/postfix/header_checks
@mgaulton
mgaulton / go_lean.sh
Created May 26, 2016 21:30 — forked from cam8001/go_lean.sh
Disable all the stuff we don't need on a MyBookLive.
#!/bin/bash
# See http://mybookworld.wikidot.com/forum/t-583096
# See http://tech.roxee.tv/2012/06/12/solving-the-my-book-live-insane-load/
# http://community.wd.com/t5/My-Book-Live-Duo/New-MyBook-Duo-4Tb-astonishingly-slow-I-mean-really-soul/td-p/417642/page/5
# Disable all this stuff, but also make miocrawler drops its logs.
# vi /etc/rsyslog.d/miocrawler.conf
# [root@storagecasa rsyslog.d]# cat miocrawler.conf
@mgaulton
mgaulton / Documentation.md
Created April 25, 2016 14:59 — forked from KartikTalwar/Documentation.md
Rsync over SSH - (40MB/s over 1GB NICs)

The fastest remote directory rsync over ssh archival I can muster (40MB/s over 1gb NICs)

This creates an archive that does the following:

rsync (Everyone seems to like -z, but it is much slower for me)

  • a: archive mode - rescursive, preserves owner, preserves permissions, preserves modification times, preserves group, copies symlinks as symlinks, preserves device files.
  • H: preserves hard-links
  • A: preserves ACLs
##########
# Tweaked Win10 Initial Setup Script
# Primary Author: Disassembler <disassembler@dasm.cz>
# Original Version: 1.4, 2016-01-16
# Tweaked based on persona preferences for @alirobe 2016-03-23 - v1.4.1
##########
# Ask for elevated permissions if required
If (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]"Administrator")) {
Start-Process powershell.exe "-NoProfile -ExecutionPolicy Bypass -File `"$PSCommandPath`"" -Verb RunAs
# Fail2Ban configuration file for allowing hosts
#
#
[INCLUDES]
before = iptables-blocktype.conf
[Definition]