Skip to content
View http.request
curl -v 'https://production-mgnl.photobox.co.uk/a/my/spabasket?code=ad142f14b69788f105a8a7f6b354cead&owner=andrew.johnstone'
* Hostname was NOT found in DNS cache
* Trying 54.171.86.219...
* Connected to production-mgnl.photobox.co.uk (54.171.86.219) port 443 (#0)
* successfully set certificate verify locations:
* CAfile: none
CApath: /etc/ssl/certs
* SSLv3, TLS handshake, Client hello (1):
* SSLv3, TLS handshake, Server hello (2):
* SSLv3, TLS handshake, CERT (11):
View http.request
curl -v https://production-mgnl.photobox.co.uk/andrew.johnstone
* Hostname was NOT found in DNS cache
* Trying 54.76.125.252...
* Connected to production-mgnl.photobox.co.uk (54.76.125.252) port 443 (#0)
* successfully set certificate verify locations:
* CAfile: none
CApath: /etc/ssl/certs
* SSLv3, TLS handshake, Client hello (1):
* SSLv3, TLS handshake, Server hello (2):
* SSLv3, TLS handshake, CERT (11):
View output.txt
$ UPDATE_ELB_POLICY=1 bash x
Region Status Current security policy Expected security policy ELB Action
eu-west-1 UP_TO_DATE sec-ELBSecurityPolicy-2015-05 ELBSecurityPolicy-2015-05 boxtop-staging-api NO_ACTION
eu-west-1 UP_TO_DATE sec-ELBSecurityPolicy-2015-05 ELBSecurityPolicy-2015-05 boxtop-staging-cms NO_ACTION
eu-west-1 UP_TO_DATE sec-ELBSecurityPolicy-2015-05 ELBSecurityPolicy-2015-05 boxtop-staging-cms-author NO_ACTION
eu-west-1 UP_TO_DATE sec-ELBSecurityPolicy-2015-05 ELBSecurityPolicy-2015-05 boxtop-staging-green-public NO_ACTION
eu-west-1 UP_TO_DATE sec-ELBSecurityPolicy-2015-05 ELBSecurityPolicy-2015-05 boxtop-staging-green-author NO_ACTION
eu-west-1 UP_TO_DATE sec-ELBSecurityPolicy-2015-05 ELBSecurityPolicy-2015-05 boxtop-integration-yellow-author NO_ACTION
eu-west-1 UP_TO_DATE sec-ELBSecurityPolicy-2015-05 ELBSecurityPolicy-2015-05 boxtop-integration-yellow
View update-elb-policy.sh
#!/usr/bin/env bash
UPDATE_ELB_POLICY=${UPDATE_ELB_POLICY:-0};
TMPFILE=`mktemp -t example.XXXXXXXXXX` && {
printf "Region|Status|Current security policy|Expected security policy|ELB|Action\n" >> "${TMPFILE}";
aws ec2 describe-regions |awk -F'"' '/RegionName/ {print $4}' | while read region; do
LATEST_PREDEFINED_SECURITY_GROUP=$(aws --region=$region elb describe-load-balancer-policies | grep -i PolicyName | awk -F '"' '{print $4}' | head -n1 | sed 's/[ \r\n]//g');
View test.sh
#!/usr/bin/env bash
LATEST_PREDEFINED_SECURITY_GROUP=$(aws elb describe-load-balancer-policies | grep -i PolicyName | awk -F '"' '{print $4}' | head -n1);
aws elb describe-load-balancers | awk -F '"' '/LoadBalancerName/ {print $4}' | while read lb; do
CURRENT_SECURITY_POLICY=$(aws elb describe-load-balancer-policies --load-balancer-name $lb | egrep ELBSecurityPolicy | awk -F'"' '/PolicyName/ {print $4}');
if [ "${LATEST_PREDEFINED_SECURITY_GROUP}" != "${CURRENT_SECURITY_POLICY}" ]; then
echo "Load balancer security policy out of date: '${lb}' - '${CURRENT_SECURITY_POLICY}' expected '${LATEST_PREDEFINED_SECURITY_GROUP}'";
fi
View aws-ecs-jenkins.sh
#/usr/bin/env bash
set -ex
SERVICE_NAME=${SERVICE_NAME:-};
IMAGE_VERSION=${IMAGE_VERSION:-};
export IMAGE_VERSION=$IMAGE_VERSION
export SERVICE_NAME=$SERVICE_NAME
export IMAGE="docker.photobox.com:443/photobox/$SERVICE_NAME"
View gist:3829cb02e983d6102c3e
--- app.js 2015-04-12 16:31:48.433430728 +0100
+++ app.js 2015-04-12 16:31:48.433430728 +0100
@@ -19,6 +19,12 @@
app.set('view engine', 'jade');
app.set('x-powered-by', false);
+var sessions = require("client-sessions")
+var c_auth = require('./lib/google-oauth')
+var config_security = require('./config/security')
+app.use(sessions({ cookieName: 'session', secret: config_security.cookie_secret }))
View upstart-kibana.conf
# Upstart Kibana
stop on shutdown
setuid kibana
setgid kibana
respawn
chdir /opt/kibana/
View gist:88d6801bdda100b77cc7
Apr 9 13:11:41 ip-10-107-16-220 kernel: [59519.943538] BUG: Bad page map in process java pte:00000320 pmd:02a5c067
Apr 9 13:11:41 ip-10-107-16-220 kernel: [59519.943549] addr:00007f5520fbc000 vm_flags:08000070 anon_vma: (null) mapping: (null) index:7f5520fbc
Apr 9 13:11:41 ip-10-107-16-220 kernel: [59519.943556] CPU: 1 PID: 18149 Comm: java Tainted: G B 3.13.0-29-generic #53-Ubuntu
Apr 9 13:11:41 ip-10-107-16-220 kernel: [59519.943558] ffff8800f4154f00 ffff8800029e3a98 ffffffff8171a214 00007f5520fbc000
Apr 9 13:11:41 ip-10-107-16-220 kernel: [59519.943561] ffff8800029e3ae0 ffffffff81174653 0000000000000320 00000007f5520fbc
Apr 9 13:11:41 ip-10-107-16-220 kernel: [59519.943563] ffff880002a5cde0 0000000000000320 00007f5520fbc000 00007f5520fbd000
Apr 9 13:11:41 ip-10-107-16-220 kernel: [59519.943565] Call Trace:
Apr 9 13:11:41 ip-10-107-16-220 kernel: [59519.943573] [<ffffffff8171a214>] dump_stack+0x45/0x56
Apr 9 13:11:41 ip-10-107-16-220 kernel: [59519.943577] [<ffffff
View gist:6b375269df5e8c0f3b16
input {
file {
path => "/var/log/syslog"
type => "syslog"
}
file {
type => "tomcat"
path => [ "/var/log/tomcat7/catalina.out" ]
codec => multiline {
pattern => "(^\d+\serror)|(^.+Exception: .+)|(^\s+at .+)|(^\s+... \d+ more)|(^\s*Caused by:.+)"
Something went wrong with that request. Please try again.