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
Options +FollowSymlinks | |
RewriteEngine on | |
# No intersticial for direct reference and self-reference | |
RewriteCond %{HTTP_REFERER} !^$ | |
RewriteCond %{HTTP_REFERER} !^http(s)?://box.leebyron.com/.*$ [NC] | |
# Add a line item for every website you don't need an intersticial for | |
# I've added my own website, gmail and facebook | |
RewriteCond %{HTTP_REFERER} !^http(s)?://([^\.]*.)?leebyron.com/.*$ [NC] | |
RewriteCond %{HTTP_REFERER} !^http(s)?://mail.google.com/.*$ [NC] |
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 | |
LINES=$(tput lines) | |
COLUMNS=$(tput cols) | |
declare -A snowflakes | |
declare -A lastflakes | |
clear |
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/perl -w | |
# Author: Konrad "morsik" Mosoń <mosonkonrad@gmail.com> | |
# linked here: http://wiki.libvirt.org/page/Networking#Applying_modifications_to_the_network | |
use strict; | |
use warnings; | |
my $net = $ARGV[0]; |
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
# HTACCESS Rewrite rule to redirect all requests to a temporary maintenance page | |
RewriteEngine On | |
RewriteBase / | |
RewriteCond %{REQUEST_URI} !^/maintenance\.html$ | |
RewriteRule ^(.*)$ http://justynshull.com/maintenance.html [R=307,L] |
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
ifconfig|grep inet|awk '{print $2}'|awk -F: '{print $NF}'|grep -v 127|grep -v ^$|tr '.' ' '|while read -a ip;do arping -Ieth0 -f -s ${ip[0]}.${ip[1]}.${ip[2]}.${ip[3]} ${ip[0]}.${ip[1]}.${ip[2]}.1;done |
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
netstat -tan | awk '{print $6}' | sort | uniq -c |
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 | |
# eximqueue.sh - 07/30/2012 - Justyn Shull <justyn [at] justynshull.com> | |
messages=`exim -bpc` | |
maxmessages=120 | |
maxrunners=50 | |
while [ 1 ]; do | |
messages=`exim -bpc` | |
currunners=`ps afx | grep '/usr/sbin/exim -q' | wc -l` | |
echo -n "." | |
if [ $currunners -lt $maxrunners ]; then |
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
perl -e 'chdir "problem_dir" or die; opendir D, "."; while ($n = readdir D) { unlink $n }' |
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
wget -O /etc/zabbix/mysql.php https://gist.github.com/raw/4604061/4026d686f69b85c8617e494ef9adb919cb7a2ea4/zabbix-mysql.php | |
echo 'UserParameter=mysql.daily,php /etc/zabbix/mysql.php daily root' >> /etc/zabbix/zabbix_agentd.conf | |
echo 'UserParameter=mysql.live,php /etc/zabbix/mysql.php live root' >> /etc/zabbix/zabbix_agentd.conf |
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/sh | |
# http://vm-192-168-11-21.shengyun.grandcloud.cn/topics/2437 | |
# redis - this script starts and stops the redis-server daemon | |
# | |
# chkconfig: 2345 90 10 | |
# description: Redis is a persistent key-value database | |
# processname: redis-server | |
# config: /etc/redis.conf | |
# config: /etc/sysconfig/redis | |
# pidfile: /var/run/redis.pid |
OlderNewer