Skip to content

Instantly share code, notes, and snippets.

@reifman
reifman / yourdomain.com
Last active December 11, 2015 19:49
Apache Site Configuration for WordPress e.g. e.g. /etc/apache2/sites-available
<VirtualHost *:8080>
ServerName yourdomain.com
ServerAlias *.yourdomain.com
DocumentRoot /var/www/your-domain-wordpress-directory-install/
</VirtualHost>
@reifman
reifman / default.vcl
Last active September 9, 2021 08:15
Example Varnish VCL Configuration e.g. /etc/varnish/default.vcl
# Default backend definition. Set this to point to your content server.
backend default {
.host = "127.0.0.1";
.port = "8080";
.connect_timeout = 60s;
.first_byte_timeout = 60s;
.between_bytes_timeout = 60s;
.max_connections = 800;
}
@reifman
reifman / varnish
Created January 28, 2013 00:09
Example Varnish configuration file e.g. /etc/default/varnish
# Configuration file for varnish
#
# /etc/init.d/varnish expects the variables $DAEMON_OPTS, $NFILES and $MEMLOCK
# to be set from this shell script fragment.
#
# Should we start varnishd at boot? Set to "no" to disable.
START=yes
# Maximum number of open files (for ulimit -n)
@reifman
reifman / Parse query string via javascript
Last active February 27, 2017 15:28
Javascript to parse query string variables from URL
<script>
function getQueryVariable(variable) {
var query = window.location.search.substring(1);
var vars = query.split("&amp;");
for (var i=0;i&lt;vars.length;i++) {
var pair = vars[i].split("=");
if (pair[0] == variable) {
return pair[1];
}
}
<?php
return array(
'version' => '0.9.2.8',
'cluster.messagebus.debug' => false,
'cluster.messagebus.enabled' => false,
'cluster.messagebus.sns.region' => '',
'cluster.messagebus.sns.api_key' => '',
'cluster.messagebus.sns.api_secret' => '',
'cluster.messagebus.sns.topic_arn' => '',