Skip to content

Instantly share code, notes, and snippets.

View chrisboulton's full-sized avatar
🚩

Chris Boulton chrisboulton

🚩
View GitHub Profile
quoll:~# redis-cli smembers ip_blacklist
1) "78.129.168.95"
2) "37.54.120.179"
3) "193.151.13.35"
4) "124.73.151.106"
5) "110.85.112.144"
6) "46.246.58.160"
7) "88.190.48.161"
8) "95.25.26.11"
9) "198.200.32.92"
--- a/mod_fastcgi.c
+++ b/mod_fastcgi.c
@@ -160,6 +160,9 @@
const char *user, const char * const group, const unsigned long q_usec,
const unsigned long req_usec)
{
+ ap_log_error(FCGI_LOG_ERR, fcgi_apache_main_server,
+ "FastCGI: (Bigcommerce modification) Call to send_pm which has been disabled.");
+ return;
#ifdef WIN32
@chrisboulton
chrisboulton / makeitmakeitnow.sh
Created July 9, 2013 04:14
package nodejs using fpm (for debian) i'm lazy, you should be too, so here's a bash script.
#!/bin/bash
set -e
VERSION=0.10.12
BUILD_DIR=`mktemp -d`
trap "rm -rf -- $BUILD_DIR" EXIT
export DESTDIR=$BUILD_DIR/build
ARCHIVE=node-v$VERSION
@chrisboulton
chrisboulton / gist:5907249
Created July 2, 2013 06:58
Specify a HTTPS proxy for Idera ServerBackup license activation
# add this to your environment in one way or another
# (a good place may be /etc/init.d/cdp-server)
# adjust where necessary.
export _JAVA_OPTIONS="-Dhttp.proxyHost=my.proxy.server -Dhttp.proxyPort=8888 -Dhttps.proxyHost=my.proxy.server -Dhttps.proxyPort=8888"
@chrisboulton
chrisboulton / gist:5899714
Created July 1, 2013 10:06
swap mysql-5.1 out with percona-server-5.5 on a box with other packages depending upon mysql
# DISCLOSURE: it is a HORRIBLE, HORRIBLE idea for you to blindly run the
# below unless you absolutely know what each and every command does and
# have a system where you can test first, have appropriate backups etc.
# this is not a script - you should run every command and keep a very
# close eye on the output for anything unexpected.
apt-get install libaio1
apt-get install -d percona-server-client-5.5 percona-server-server-5.5 percona-server-server-5.5 libmysqlclient18=5.5.31-rel30.3-520.squeeze libmysqlclient-dev=5.5.31-rel30.3-520.squeeze
lines = '# Generated by iptables-save v1.4.8 on Sun Jun 30 20:28:03 2013
*raw
:PREROUTING ACCEPT [389063:480408960]
:OUTPUT ACCEPT [365429:736377112]
-A PREROUTING -p udp -m udp --dport 8125 -m comment --comment "disable conntrack for statsd" -j NOTRACK
COMMIT
# Completed on Sun Jun 30 20:28:03 2013
# Generated by iptables-save v1.4.8 on Sun Jun 30 20:28:03 2013
*nat
:PREROUTING ACCEPT [6621:379806]
@chrisboulton
chrisboulton / gist:5692394
Last active December 17, 2015 23:49
CB's "I have some of the ingredients but not all of the ingredients slow-cooker chili"
500g ground beef
1 red onion
1 green pepper
1 red pepper
1 chilli
3 garlic cloves
800g diced tomatos
4 tbsp tomato paste
smoked paprika
cayenne pepper
#!/bin/sh
set -x
REDIS_CLI="redis-cli"
REDIS_SERVER="/usr/bin/redis-server"
START_STOP="/sbin/start-stop-daemon"
E_INVALID_ARGS=65
E_INVALID_COMMAND=66
E_NO_SLAVES=67
@chrisboulton
chrisboulton / graphite.ini
Last active December 15, 2015 14:09
Graphite aggregation rules for StatsD
[statsd_lower]
pattern = ^stats\..*\.lower(_[0-9]+)?$
aggregationMethod = min
xFilesFactor = 0.1
[statsd_upper]
pattern = ^stats\..*\.upper(_[0-9]+)?$
aggregationMethod = max
xFilesFactor = 0.1
$default_node_params = {
'name' => $::fqdn,
'data' => $is_data,
'master' => $is_master,
}
# awareness values should be munched into the 'node' config section
$node_params = merge($default_node_params, $awareness_attributes)
class { 'elasticsearch':