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
if RUBY_PLATFORM.include? "darwin" | |
unless File.exists? "/Library/Server/Mail/Data/spool" | |
puts "***********************************************************************" | |
puts "Hey there Mountain Lion user - your computer isn't set up to send email" | |
puts "You need to open a Terminal and execute these commands:" | |
puts "" | |
puts "sudo mkdir -p /Library/Server/Mail/Data/spool" | |
puts "sudo /usr/sbin/postfix set-permissions" | |
puts "sudo /usr/sbin/postfix start" | |
puts "***********************************************************************" |
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/sh | |
NGINX_VERSION=1.3.11 | |
TMP_PATH=/tmp | |
# Fetch and extract Nginx | |
cd $TMP_PATH | |
wget http://nginx.org/download/nginx-$NGINX_VERSION.tar.gz | |
tar xvfz nginx-$NGINX_VERSION.tar.gz | |
cd nginx-$NGINX_VERSION |
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
check process nginx with pidfile /var/run/nginx.pid | |
start program = "/usr/sbin/service nginx start" with timeout 60 seconds | |
stop program = "/usr/sbin/service nginx stop" | |
if cpu > 60% for 2 cycles then alert | |
if cpu > 80% for 5 cycles then restart | |
if failed host www.davidmichaelross.com port 80 protocol http | |
and request "/license.txt" | |
then restart | |
if 3 restarts within 5 cycles then timeout | |
group server |
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
check process mysql with pidfile /var/run/mysqld/mysqld.pid | |
start program = "/usr/sbin/service mysql start" with timeout 60 seconds | |
stop program = "/usr/sbin/service mysql stop" | |
if cpu > 60% for 2 cycles then alert | |
if cpu > 90% for 5 cycles then restart | |
if 3 restarts within 5 cycles then timeout | |
group server |
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
check process php5-fpm with pidfile /var/run/php5-fpm.pid | |
start program = "/usr/sbin/service php5-fpm start" with timeout 60 seconds | |
stop program = "/usr/sbin/service php5-fpm stop" | |
if cpu > 60% for 2 cycles then alert | |
if cpu > 90% for 5 cycles then restart | |
if 3 restarts within 5 cycles then timeout | |
group server |
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/sh | |
### BEGIN INIT INFO | |
# Provides: maldetect | |
# Required-Start: $remote_fs $syslog | |
# Required-Stop: $remote_fs $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Malware scanner | |
# Description: Malware scanner | |
### END INIT INFO |
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
check process maldet with pidfile /var/run/maldet.pid | |
start = "/etc/init.d/maldet start" with timeout 60 seconds | |
stop = "/etc/init.d/maldet stop" | |
if cpu > 60% for 2 cycles then alert | |
if cpu > 80% for 5 cycles then restart | |
if 3 restarts within 5 cycles then timeout | |
group server |
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
<script>jQuery(function() { jQuery('input[name="s"]').on('keypress', function(event) {if( event.which == 13 ) { event.preventDefault(); }});});</script> |
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
*filter | |
# Allows all loopback (lo0) traffic and drop all traffic to 127/8 that doesn't use lo0 | |
-A INPUT -i lo -j ACCEPT | |
-A INPUT ! -i lo -d 127.0.0.0/8 -j REJECT | |
# Accepts all established inbound connections | |
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT | |
# Allows all outbound traffic |
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
// There should be an "ajaxurl" variable set that you can use instead of hard-coding the url here | |
jQuery.get('/wp-admin/admin-ajax.php', {'action': 'this_sucks', 'postid': '1234'}, function(data, status, jqXHR) { | |
// Display post here | |
}); |
OlderNewer