Skip to content

Instantly share code, notes, and snippets.

@alanmackenzie
alanmackenzie / acquia-connector-behind-proxy-config.php
Created January 14, 2013 11:23
Drupal configuration to get the acquia connector to function correctly behind a proxy.
<?php
// Place the following in your settings.php.
$conf['proxy_server'] = 'www-cache.my.proxy.com';
$conf['proxy_port'] = '80';
define('ACQUIA_DEVELOPMENT_NOSSL', TRUE);
@alanmackenzie
alanmackenzie / acquia_fix.drush.inc
Created August 30, 2012 09:59
Fixes your Acquia Solr Search configuration after the down time on 28th Aug 2012.
<?php
/**
* @file
* This file contains a drush command to fix acquia solr service issues on
* the 28th Aug 2012.
* @see http://status.acquia.com/node/31
*/
/**
* Implements hook_drush_command().
@alanmackenzie
alanmackenzie / default.c
Created May 28, 2012 16:52 — forked from jelder/newrelic.h
Add X-Request-Start header so we can track queue times in New Relic RPM beginning at Varnish. - Fixed for Varnish 3.0.2-1 on Ubuntu.
/*
* In varnish 3.0 the includes must be outside a subroutine.
*/
C{
#include <stddef.h>
#include <sys/time.h>
}C
@alanmackenzie
alanmackenzie / atomic-symlink-create-or-update.sh
Created January 12, 2012 14:02
Atomically update the target of a symlink.
@alanmackenzie
alanmackenzie / execute-as-initial.sh
Created November 28, 2011 17:41
A bash function that executes a command as the original user account that you initially logged in with. Useful in conjunction with su and sudo.
# This function will execute a command as the original account
# that a user logged in with. This is useful in conjunction with
# su and sudo.
#
# e.g.
# If you su to root ${HOME} will be /root rather than the home
# of the account you initially logged in with.
#
# execute-as-login COMMAND [VARIABLE]
#