Skip to content

Instantly share code, notes, and snippets.

@alanivey
alanivey / shuttle_config.sh
Created December 10, 2013 18:46
Shuttle (http://fitztrev.github.io/shuttle/) config with Vagrant, all Storm on Demand (stormondemand.com) servers, and all Liquid Web servers
#!/bin/bash
echo "{"
echo "\"_comment\": \"Valid terminals include: 'Terminal.app' or 'iTerm'\","
echo "\"terminal\": \"iTerm\","
echo "\"hosts\": ["
echo "{"
echo "\"name\": \"Vagrant\","
@alanivey
alanivey / gist:7535763
Created November 18, 2013 21:36
XtraBackup Incremental
# backup
innobackupex --no-timestamp /var/lib/mysql-backup/full
innobackupex --no-timestamp --incremental /var/lib/mysql-backup/incremental1 --incremental-basedir=/var/lib/mysql-backup/full
innobackupex --no-timestamp --incremental /var/lib/mysql-backup/incremental2 --incremental-basedir=/var/lib/mysql-backup/incremental1
innobackupex --no-timestamp --incremental /var/lib/mysql-backup/incremental3 --incremental-basedir=/var/lib/mysql-backup/incremental2
#prepare incrementals into full
innobackupex --apply-log --redo-only /root/backup/full
@alanivey
alanivey / .htaccess
Created November 15, 2013 15:13
WordPress default .htaccess
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
#!/bin/bash
# tungsten-slave-createcachetables.sh
# Tungsten is not extracting data for the following pattern (Drupal 6 and 7):
# replicator.filter.replicate.ignore=*.access,*.cache,*.cache_*,*.ctools_*_cache,*.views_*_cache,*.sessions,*.watchdog
# This means that the tables would not exist on the slave. It would be ideal to have
# the tables exist, but be empty.
# This script will create empty tables for any table matching the pattern in 'grep' commands below.
# It is manually set to match the same replicator.filter.replicate.ignore in the tungsten config.
core = 7.x
api = 2
projects[drupal][version] = 7
@alanivey
alanivey / gist:6064500
Last active December 20, 2015 03:29
Pressflow 7 differences (October 2013)
diff -x '*.info' -x LICENSE.txt -ruN core/ pressflow/
diff -x '*.info' -x LICENSE.txt -ruN core/includes/bootstrap.inc pressflow/includes/bootstrap.inc
--- core/includes/bootstrap.inc 2013-08-07 22:04:26.000000000 -0400
+++ pressflow/includes/bootstrap.inc 2013-10-17 15:26:18.000000000 -0400
@@ -717,6 +717,22 @@
}
$is_https = isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on';
+ // Load environmental config, if present.
+ if (isset($_SERVER['PRESSFLOW_SETTINGS'])) {
@alanivey
alanivey / php-fpm-www.conf
Last active December 15, 2015 03:09
php53-fpm on CentOS 5
; Start a new pool named 'www'.
[www]
; The address on which to accept FastCGI requests.
; Valid syntaxes are:
; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific address on
; a specific port;
; 'port' - to listen on a TCP socket to all addresses on a
; specific port;
; '/path/to/unix/socket' - to listen on a unix socket.
@alanivey
alanivey / gist:4709843
Created February 4, 2013 21:24
Chef MySQL Server use encrypted data bag for passwords
diff --git a/cookbooks/mysql/recipes/server.rb b/cookbooks/mysql/recipes/server.rb
index 8229adc..0caf44e 100644
--- a/cookbooks/mysql/recipes/server.rb
+++ b/cookbooks/mysql/recipes/server.rb
@@ -35,10 +35,21 @@ if Chef::Config[:solo]
].join(' '))
end
else
- # generate all passwords
- node.set_unless['mysql']['server_debian_password'] = secure_password
@alanivey
alanivey / libxml-ruby-1.1.3-libxml2-2.9.patch
Last active August 29, 2015 14:19
libxml-ruby-1.1.3 for libxml2-2.9
diff --git a/vendor/gems/libxml-ruby-1.1.3/ext/libxml/ruby_xml_node.c b/vendor/gems/libxml-ruby-1.1.3/ext/libxml/ruby_xml_node.c
index ed058d2..7c48017 100644
--- a/vendor/gems/libxml-ruby-1.1.3/ext/libxml/ruby_xml_node.c
+++ b/vendor/gems/libxml-ruby-1.1.3/ext/libxml/ruby_xml_node.c
@@ -571,10 +571,17 @@ static VALUE rxml_node_to_s(int argc, VALUE *argv, VALUE self)
xmlNodeDumpOutput(output, xnode->doc, xnode, level, indent, xencoding);
xmlOutputBufferFlush(output);
+#ifdef LIBXML2_NEW_BUFFER
+ if (output->conv)
@alanivey
alanivey / ruby-1.8.7-p374-openssl.patch
Last active August 29, 2015 14:19
Ruby 1.8.7-p374 and 1.8.7-p375, ruby-build, CentOS 7
diff --git a/ChangeLog b/ChangeLog
index 6a36633..614eb99 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+Sat Jul 6 07:37:43 2013 Martin Bosslet <Martin.Bosslet@gmail.com>
+
+ * ext/openssl/ossl_pkey_ec.c: Ensure compatibility to builds of
+ OpenSSL with OPENSSL_NO_EC2M defined, but OPENSSL_NO_EC not
+ defined.