Skip to content

Instantly share code, notes, and snippets.

View w3tc-settings-example.php
<?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' => '',
@reifman
reifman / Parse query string via javascript
Last active Feb 27, 2017
Javascript to parse query string variables from URL
View Parse query string via javascript
<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];
}
}
@reifman
reifman / varnish
Created Jan 28, 2013
Example Varnish configuration file e.g. /etc/default/varnish
View 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 / default.vcl
Last active Jun 25, 2020
Example Varnish VCL Configuration e.g. /etc/varnish/default.vcl
View 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 / yourdomain.com
Last active Dec 11, 2015
Apache Site Configuration for WordPress e.g. e.g. /etc/apache2/sites-available
View yourdomain.com
<VirtualHost *:8080>
ServerName yourdomain.com
ServerAlias *.yourdomain.com
DocumentRoot /var/www/your-domain-wordpress-directory-install/
</VirtualHost>
You can’t perform that action at this time.