This file contains 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
from __future__ import with_statement # we'll use this later, has to be here | |
from argparse import ArgumentParser | |
import requests | |
from BeautifulSoup import BeautifulStoneSoup as Soup | |
def parse_sitemap(url): | |
resp = requests.get(url) | |
# we didn't get a valid response, bail |
This file contains 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 | |
scriptname=$(basename "$0") | |
for index in $(pacmd list-sink-inputs | egrep -i -B 25 "seamonkey|chrome|firefox" | grep index: | awk '{print $2}') | |
do | |
volume=$(pacmd list-sink-inputs | grep -A 8 "index: ${index}" | grep volume: | awk '{print $3}') | |
if [ $scriptname == "volume-up" ] | |
then | |
echo "volume up" |
This file contains 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
filter f_apache_error { match('^apache2' value("MSGHDR")) }; | |
filter f_apache_error_send_email { | |
(message('Option') and message('not allowed here')) | |
}; | |
filter f_apache_php_notice { | |
message('PHP Notice') or | |
message('PHP Deprecated') or | |
message('PHP Strict Standards') |
This file contains 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
CFLAGS="-march=core2 -O2 -pipe" | |
CXXFLAGS="${CFLAGS}" | |
CHOST="x86_64-pc-linux-gnu" | |
USE="mmx sse sse2 apache2 -gtk -gnome -kde -alsa -cups -X" | |
MAKEOPTS="-j2" | |
GENTOO_MIRRORS="ftp://ftp.gtlib.gatech.edu/pub/gentoo http://gentoo.osuosl.org/" | |
PORTAGE_ELOG_MAILURI="noc@redacted.com" | |
PORTAGE_ELOG_MAILFROM="noc@redacted.com" | |
PORTAGE_BINHOST="http://gentoo-binhost.redacted.com/" | |
EMERGE_DEFAULT_OPTS="--autounmask=y --getbinpkg" |
This file contains 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
=========== preseed.cfg ========== | |
#### IMPORTANT NOTE - replace "strongpassword" with an actual strong | |
password. | |
## autostart SSH install | |
d-i debian-installer/country string AU | |
d-i debian-installer/locale string en_AU.UTF-8 | |
d-i debian-installer/language string en_AU:en | |
### Network configuration | |
# d-i netcfg/disable_dhcp boolean true |
This file contains 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 python3 | |
import sys | |
# create mysqldump commands to create multiple sql files for a single (large) table | |
# specify dump_file_count for desired number of files | |
db_host = 'HOST' | |
db_user = 'USER' | |
db_name = 'DBNAME' | |
db_pass = 'PASS' |
This file contains 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
https://github.com/ewwhite/zfs-ha/wiki | |
http://zfswatcher.damicon.fi/ | |
https://serverfault.com/questions/842531/how-to-perform-incremental-continuous-backups-of-zfs-pool | |
http://wiki.lustre.org/Optimizing_Performance_of_SSDs_and_Advanced_Format_Drives | |
http://www.bolthole.com/solaris/zrep/zrep.documentation.html |
This file contains 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 bash | |
function print_help { | |
echo "remove an ip address from all fail2ban jails" | |
echo "$(basename $0) ip_address [ip_address] [ip_address]" | |
} | |
if [[ -z "$@" ]] | |
then | |
print_help | |
fi |
This file contains 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
<?php | |
/* | |
Wordpress bug https://core.trac.wordpress.org/ticket/47855 | |
When using a current PHP version, class-phpmailer.php:validateAddress() uses a complex regex ("pcre8") for email address validation. | |
PHP < 7.3 uses libpcre 8.x. | |
PHP 7.3 uses libpcre2 10.x. | |
Due to a bug in libpcre2 < 10.32-RC1 https://bugs.exim.org/show_bug.cgi?id=2300, |
This file contains 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 | |
# prune sqlite db file for fail2ban v 0.9.x | |
# run me from cron to keep sqlite db a sane size | |
# fail2ban doesn't purge old entries from sqlite db, so it grows until things break | |
# https://gist.github.com/yolabingo/ef4a41853b46503bb2e6537d1129fb46 | |
dbfile=$(fail2ban-client get dbfile | grep "\`-" | awk '{print $2}') | |
dbpurgeage=$(fail2ban-client get dbpurgeage | grep "\`-" | awk '{print $2}' | sed 's/seconds.*//') |
OlderNewer