This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# The next three variables specifies where the location of the RRD | |
# databases, the HTML output, and the logs, severally. They all | |
# must be writable by the user running munin-cron. | |
dbdir /var/lib/munin | |
htmldir /var/www/munin | |
logdir /var/log/munin | |
rundir /var/run/munin | |
# Where to look for the HTML templates | |
tmpldir /etc/munin/templates |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Example config-file for munin-node | |
# | |
log_level 4 | |
log_file /var/log/munin/munin-node.log | |
pid_file /var/run/munin/munin-node.pid | |
background 1 | |
setseid 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import os | |
from munin import MuninPlugin | |
class TmpFileCount(MuninPlugin): | |
title = "Number of Files in /tmp" | |
args = "--base 1000 -l 0" | |
vlabel = "files" | |
scaled = False |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import MySQLdb | |
import os, sys | |
import pprint | |
pp = pprint.PrettyPrinter() | |
mysql_host = "localhost" | |
mysql_user = "dbusername" | |
mysql_pass = "dbpassword" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
subnet 192.168.0.0 netmask 255.255.255.0 { | |
range 192.168.0.100 192.168.0.200; | |
option broadcast-address 192.168.0.255; | |
option routers 192.168.0.1; | |
on commit { | |
set ClientIP = binary-to-ascii(10, 8, ".", leased-address); | |
set ClientMac = binary-to-ascii(16, 8, ":", substring(hardware, 1, 6)); | |
log(concat("Commit: IP: ", ClientIP, " Mac: ", ClientMac, "Hostname: ", host-decl-name)); | |
execute("/usr/local/bin/dhcp-event", "commit", ClientIP, ClientMac, host-decl-name); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RewriteEngine On | |
RewriteCond %{HTTP_COOKIE} !^PHPSESSID [NC] | |
RewriteRule .*/? http://example.org/not-authorized [R] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# How To Create a client certificate | |
#As Root | |
cd /etc/ssl/myca | |
echo "Enter your username/tag!" | |
read USERNAME | |
echo "creating a CSR" | |
openssl req -config openssl.my.cnf -new -nodes -keyout private/${USERNAME}.key -out csr/${USERNAME}.csr -days 365 | |
echo "Sign the CSR, get a Certificate" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SSLEngine On | |
## path to the server signed certificate | |
SSLCertificateFile /etc/ssl/myca/certs/webserver.crt | |
## path to the server key | |
SSLCertificateKeyFile /etc/ssl/myca/private/webserver.key | |
## path to Root CA signed certificate | |
SSLCACertificateFile /etc/ssl/myca/certs/myca.crt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
root@holborn:~# apt-get install openssl | |
... | |
root@holborn:/etc/ssl# ls | |
certs openssl.cnf private | |
... | |
root@holborn:/etc/ssl# mkdir myca | |
root@holborn:/etc/ssl# cd myca | |
root@holborn:/etc/ssl/myca# mkdir private certs newcerts crl |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# | |
# Fecking ugly thing I wrote to parse lulzsec's password releases | |
# and display some fairly anonymous data. | |
# Usage: password_analysis.py <filename to process> | |
# App expects Email | Password | |
# Easily modified to fit a file format. | |
import re | |
import operator |
OlderNewer