=======================
*,
=======================
*,
#!/usr/bin/env python | |
# | |
import DNS | |
import time | |
import sys | |
from collections import defaultdict | |
services = { | |
#'local': ['192.168.10.1'], |
THE BALLAD OF DAVID "BLACKADDER" IRVING | |
(sung to the theme song of "Black Adder") | |
From some gormless public school, | |
Came forth Revision's brightest scholar, | |
Toffee-nosed, but he's no fool, | |
He raked in quids and marks and dollars! | |
Dave Irving, Dave Irving, | |
With nothing left to lose, |
# Inspiration: http://serverfault.com/a/5551 (but basically rewritten) | |
function fawk() { | |
USAGE="\ | |
usage: fawk [<awk_args>] <field_no> | |
Ex: getent passwd | grep andy | fawk -F: 5 | |
" | |
if [ $# -eq 0 ]; then | |
echo -e "$USAGE" >&2 | |
return | |
#exit 1 # whoops! that would quit the shell! |
<?php | |
function rblcheck($host) { // Note: I have no idea how well suited CBL is for this purpose. If it gets annoying we can remove it ~ Aurora | |
$rbls = array('sbl-xbl.spamhaus.org', 'rbl.efnet.org', 'cbl.abuseat.org', 'dnsbl.dronebl.org'); | |
foreach($rbls as $rbl) { | |
$lookup = implode('.', array_reverse(explode('.', $host))) . '.' . $rbl; | |
if (strstr(gethostbyname($lookup), "127.0.0")) { | |
return $rbl; | |
} | |
} | |
return 0; |
<?php | |
/* | |
Author: Jim Westergren & Jeedo Aquino | |
File: index-with-redis.php | |
Updated: 2012-10-25 | |
This is a redis caching system for wordpress. | |
see more here: www.jimwestergren.com/wordpress-with-redis-as-a-frontend-cache/ |
#!/bin/bash | |
# cpustatus | |
# | |
# Prints the current state of the CPU like temperature, voltage and speed. | |
# The temperature is reported in degrees Celsius (C) while | |
# the CPU speed is calculated in megahertz (MHz). | |
function convert_to_MHz { | |
let value=$1/1000 | |
echo "$value" |
#!/bin/bash | |
# Raspberry Pi ZRAM script | |
# Tuned for quad core, 1 GB RAM models | |
# put me in /etc/init.d/zram.sh and make me executable | |
# then run "sudo update-rc.d zram.sh defaults" | |
modprobe zram | |
echo 3 >/sys/devices/virtual/block/zram0/max_comp_streams | |
echo lz4 >/sys/devices/virtual/block/zram0/comp_algorithm |
Credit where credit's due, I mainly used these 3 resources to get this all working. There were several others but I don't exactly remember which is which. So at least here are the 3 main places that I used. | |
The vast majority of this came from this link, the others helped me make it work for Plex. | |
http://emby.media/community/index.php?/topic/30975-reverse-proxy-with-ssl-hostname-routing-and-embyopenvpn-port-sharing/ | |
https://gist.github.com/spikegrobstein/4384954 | |
https://forums.plex.tv/discussion/207725/ubuntu-14-04-4-lts-plex-incorrectly-handles-lower-case-headers#latest | |
The data flow here is: |
## | |
# Ubuntu 16.04 Xenial Xerus | |
## | |
###################################### | |
# INITIAL SERVER SETUP & HARDENING | |
###################################### | |
ssh root@1.2.3.4 |