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AAAA3NpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDE0IDc5LjE1MTQ4MSwgMjAxMy8wMy8xMy0xMjowOToxNSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDpmMDk3ZWJmYS0yODA4LTRkNDUtOTYxMC01YTkzNzU4YzY4YmEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6REMzOTkzNzA0OEZGMTFFNkJCNTNCODBEODQ4N0M2NzgiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6REMzOTkzNkY0OEZGMTFFNkJCNTNCODBEODQ4N0M2NzgiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIChNYWNpbnRvc2gpIj
View AXFR zone file migration to PowerDNS
#!/bin/sh
# Quick and dirty zone file migration from AXFR to PowerDNS with MySQL backend. Contains zero error handling.
# $1 = zone (i.e. google.com)
# $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/$1.zone; sed -i 's/NATIVE/MASTER/g' /tmp/$1.zone; rm /tmp/$zone.$$;
echo "SQL zone file is now available as /tmp/$1.zone"
echo "Import the SQL zone file using mysql -uroot -p pdns < /tmp/$1.zone"
echo "Important: Check the new zone with pdnsutil check-zone $1 after importing"
View sshfpgen.sh
#!/bin/bash
# Creates SSHFP Records for all available keys
#
# Copyright (c) 2013, John W. O'Brien
#
# See the accompanying LICENSE file for usage
#
# IANA code points
# https://www.iana.org/assignments/dns-sshfp-rr-parameters/
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
View naswake.sh
#!/bin/sh
. /etc/rc.common
CheckForNetwork
while [ "${NETWORKUP}" != "-YES-" ]
do
sleep 1
NETWORKUP=
CheckForNetwork
done
/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"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd"><plist version="1.0">
<dict>
<key>Label</key>
<string>com.trick77.wol2</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/naswake.sh</string>
</array>
View virt-backup.pl
#!/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):
# /virt-backup.pl --vm mykvm --state --snapsize=20G --backupdir /tmp --debug --compress
#
# AUTHOR
# Daniel Berteaud <daniel@firewall-services.com>
#
View gov.sh
#!/bin/bash
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 ]
then
echo "Usage: $0 [$available_governors]"
fi
function current_cpu_governor ()
{