Skip to content

Instantly share code, notes, and snippets.

View Wireguard Client

Wireguard Client Isolation

The Wireguard VPN doesn’t isolate clients on default. If you want to enable client isolation, you can do so via the following iptables rules:

iptables -I FORWARD -i wg0 -o wg0 -j REJECT --reject-with icmp-adm-prohibited
ip6tables -I FORWARD -i wg0 -o wg0 -j REJECT --reject-with icmp6-admin-prohibited
Fossil01 / backup_db_incremental.php
Created Sep 12, 2016 — forked from zetas/backup_db_incremental.php
Incremental DB Backup Scripts
View backup_db_incremental.php
* Incremental DB Backup Script.
* Requires: innobackupex percona script.
* Meant to run via cron, every 8 hours. It assumes during the fourth
* invocation a day has gone by.
* @author Kingcat <>
Fossil01 /
Last active May 18, 2016 — forked from KartikTalwar/
Rsync over SSH - (40MB/s over 1GB NICs)
rsync -aHXx --numeric-ids --delete --info=progress2 -e "ssh -T -c -o Compression=no -x" /localpath user@dest:/path
Fossil01 /
Last active May 18, 2016
Create RAID array on OVH Server

Creating a RAID array on OVH Servers with Hardware RAID (MegaRAID)

Type this into your terminal:

MegaCli -CfgLDAdd -R1[252:2,252:3] -a0

Where R1 means RAID-1. So R0 means RAID-0 etc.

252:2 and 252:3 are the disk numbers as they appear in MegaCLI. 2,3 were my two SATA disks. The SSD's were already configured as RAID-1 when installing the OS. Not sure what 252 means.

Fossil01 / gist:b3ae40dfcb4405601489
Created Feb 9, 2016
Edgerouter / VyOS / Vyatta iPXE DHCP Options
View gist:b3ae40dfcb4405601489
set service dhcp-server global-parameters "if exists user-class and option user-class = &quot;iPXE&quot; {"
set service dhcp-server global-parameters "filename &quot;;;"
set service dhcp-server global-parameters " } else { "
set service dhcp-server global-parameters "filename &quot;undionly.kpxe&quot;;"
set service dhcp-server global-parameters "}"
set service dhcp-server global-paramters "next-server;"
Fossil01 /
Created Nov 5, 2015
Build Go project for some architectures
echo Compiling for Linux/arm
GOOS=linux GOARCH=arm go build -o bin/getNZB-linux_arm getNZB.go
echo Compiling for Linux/i386
GOOS=linux GOARCH=386 go build -o bin/getNZB-linux_i386 getNZB.go
echo Compiling for Linux/amd64
GOOS=linux GOARCH=amd64 go build -o bin/getNZB-linux_amd64 getNZB.go
echo Compiling for Darwin/amd64
GOOS=darwin GOARCH=amd64 go build -o bin/getNZB-OSX_amd64 getNZB.go
echo Compiling for Windows/i386
GOOS=windows GOARCH=386 go build -o bin/getNZB-windows-i386 getNZB.go