View AXFR zone file migration to PowerDNS
# Quick and dirty zone file migration from AXFR to PowerDNS with MySQL backend. Contains zero error handling.
# $1 = zone (i.e.
# $2 = IP of the nameserver which allows AXFR for the zone in $1 (make sure to whitelist your outgoing IP on that nameserver)
dig +nosplit +onesoa @$2 $1 AXFR > /tmp/$zone.$$; zone2sql --gmysql --zone-name=$1 --zone=/tmp/$zone.$$ > /tmp/$; sed -i 's/NATIVE/MASTER/g' /tmp/$; rm /tmp/$zone.$$;
echo "SQL zone file is now available as /tmp/$"
echo "Import the SQL zone file using mysql -uroot -p pdns < /tmp/$"
echo "Important: Check the new zone with pdnsutil check-zone $1 after importing"
# Creates SSHFP Records for all available keys
# Copyright (c) 2013, John W. O'Brien
# See the accompanying LICENSE file for usage
# IANA code points
View Compiling Quagga with SNMP support
apt-get install iproute
apt-get build-dep quagga
export WANT_SNMP=1 && mkdir -p /root/src/quagga && cd /root/src/quagga && apt-get -b source quagga && cd /root/src/quagga
dpkg -i quagga_0.99.22.4-3ubuntu1_amd64.deb # (your version may be different)
apt-mark hold quagga # so it won't be replaced by a newer version unless we say so
. /etc/rc.common
while [ "${NETWORKUP}" != "-YES-" ]
sleep 1
/usr/local/bin/wakeonlan 00:08:9B:C5:BD:21 #<-- Enter NAS MAC address here
View com.trick77.wol.plist
<?xml version="1.0"
encoding="UTF-8"?><!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
""><plist version="1.0">
#!/usr/bin/perl -w
# 1. Install required dependencies:
# sudo apt-get install -y libxml-simple-perl pv libsys-virt-perl
# 2. Run it like this (assuming the LVM disk size is 20G):
# / --vm mykvm --state --snapsize=20G --backupdir /tmp --debug --compress
# Daniel Berteaud <>
available_governors=$(cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_available_governors \
| head -1 | sed -e 's/ \([a-zA-Z0-9]\)/|\1/g' -e 's/ $//')
if [ $# -ne 1 ]
echo "Usage: $0 [$available_governors]"
function current_cpu_governor ()
View gist:c86e374f8ee1998925c4
### Keybase proof
I hereby claim:
* I am trick77 on github.
* I am trick77 ( on keybase.
* I have a public key whose fingerprint is 0D7F 1F4C 3C3E 5B04 D48B 9959 3F3D 3A43 8A08 8D6F
To claim this, I am signing this object: