Skip to content

Instantly share code, notes, and snippets.

View gclitheroe's full-sized avatar

Geoff Clitheroe gclitheroe

  • Xero
  • New Zealand
View GitHub Profile

Keybase proof

I hereby claim:

  • I am gclitheroe on github.
  • I am geoffc (https://keybase.io/geoffc) on keybase.
  • I have a public key whose fingerprint is BCC4 3F71 EC8F C6E3 768C 4812 48D3 5E7E EDEF 918E

To claim this, I am signing this object:

@gclitheroe
gclitheroe / varnish-ban-config
Created March 3, 2012 05:21
Varnish BAN config
if (req.request == "DELETE") {
if (!client.ip ~ purge) {
error 405 "Not allowed.";
}
if (req.http.X-BanExpression) {
ban(req.http.X-BanExpression);
}
else {
ban_url(req.url);
}
@gclitheroe
gclitheroe / mule-varnish-http
Created March 3, 2012 05:22
mule-varnish-http
<http:outbound-endpoint host="localhost" port="${quakevarnish.varnish.port}" method="DELETE">
<property key="X-BanExpression" value="obj.http.X-Url ~ /quakes/*"/>
</http:outbound-endpoint>
@gclitheroe
gclitheroe / mulejmsfailover.xml
Created January 14, 2012 01:19
Mule JMS failover
<jms:activemq-connector name="jmsVmDurable" specification="1.1"
brokerURL="failover:(${seiscomp.producer.amq.url})" clientId="${mule.serverId}.sc3.producer"
durable="true" persistentDelivery="true">
</jms:activemq-connector>
<jms:activemq-connector name="jmsVmNonDurable" specification="1.1"
brokerURL="failover:(${seiscomp.producer.amq.url})" clientId="${mule.serverId}.sc3.producer.nondurable"
durable="false" persistentDelivery="false">
</jms:activemq-connector>
@gclitheroe
gclitheroe / mulestarted.txt
Created January 14, 2012 00:50
Mule started
Mule: both applications are deployed
...
**********************************************************************
* - - + APPLICATION + - - * - - + STATUS + - - *
**********************************************************************
* muletimechatter-1.0-SNAPSHOT * DEPLOYED *
* default * DEPLOYED *
* seiscompproducer-1.0-SNAPSHOT * DEPLOYED *
**********************************************************************
<jms:activemq-connector name="jmsVmDurable" specification="1.1"
brokerURL="${seiscomp.producer.amq.url}" clientId="${mule.serverId}.sc3.producer"
durable="true" persistentDelivery="true">
</jms:activemq-connector>
<jms:activemq-connector name="jmsVmNonDurable" specification="1.1"
brokerURL="${seiscomp.producer.amq.url}" clientId="${mule.serverId}.sc3.producer.nondurable"
durable="false" persistentDelivery="false">
</jms:activemq-connector>
@gclitheroe
gclitheroe / gist:8c40bc84da4227b8e4df
Created March 25, 2015 08:52
Golang - Log to Logentries - TLS
package main
import (
"github.com/GeoNet/log/logentries"
"log"
"time"
)
func init() {
logentries.Init("LOGENTRIES_TOKEN")
@gclitheroe
gclitheroe / gist:919e1ef46b3e415a4603
Created March 25, 2015 08:31
Golang - Log to Logentries
ackage main
import (
"log"
"log/syslog"
)
func main() {
w, err := syslog.Dial("tcp", "api.logentries.com:10000", syslog.LOG_NOTICE, "LE_TOKEN")
if err != nil {
@gclitheroe
gclitheroe / sysconfig mule
Created May 13, 2014 01:32
/etc/sysconfig/mule
SPRING_PROFILE=production
LOGENTRIES_TOKEN=blah123abc
@gclitheroe
gclitheroe / mule-conf
Last active August 29, 2015 14:01
mule conf for logging
...
wrapper.java.additional.4=-Dspring.profiles.active="%SPRING_PROFILE%"
wrapper.java.additional.4.stripquotes=TRUE
wrapper.java.additional.5=-Dhost.name="%HOSTNAME%"
wrapper.java.additional.5.stripquotes=TRUE
wrapper.java.additional.6=-Dlogentries.token="%LOGENTRIES_TOKEN%"
wrapper.java.additional.6.stripquotes=TRUE