Skip to content

Instantly share code, notes, and snippets.

@dcarley
dcarley / with-jq.sh
Created April 7, 2016 16:59
awscli --query vs. jq
subscribed=$(aws sns list-subscriptions | jq -c ".[][] | select(.TopicArn | contains(\"${topic_arn}\")) | .Endpoint" | tr -d \")
package main
import (
"fmt"
"io/ioutil"
"log"
"os"
"regexp"
"github.com/concourse/atc"
@dcarley
dcarley / gist:2db86780eb99c2586f4b
Created February 12, 2016 14:18
cat disagrees
➜ paas-cf git:(master) ✗ git di | cat
diff --git a/manifests/bosh-manifest/spec/fixtures/bosh-secrets.yml b/manifests/bosh-manifest/spec/fixtures/bosh-secrets.yml
index b79dc79..61a0c42 100644
--- a/manifests/bosh-manifest/spec/fixtures/bosh-secrets.yml
+++ b/manifests/bosh-manifest/spec/fixtures/bosh-secrets.yml
@@ -7,4 +7,5 @@ secrets:
bosh_redis_password: BOSH_REDIS_PASSWORD
bosh_blobstore_director_password: BOSH_BLOBSTORE_DIRECTOR_PASSWORD
bosh_hm_director_password: BOSH_HM_DIRECTOR_PASSWORD
- bosh_admin_password: BOSH_ADMIN_PASSWORD
@dcarley
dcarley / config.diff
Created October 1, 2015 08:28
Varnish ACL /32 test
diff --git a/mock_cdn_config/modules/varnish/templates/default.vcl.erb b/mock_cdn_config/modules/varnish/templates/default.vcl.erb
index 4dd5d5b..996953f 100644
--- a/mock_cdn_config/modules/varnish/templates/default.vcl.erb
+++ b/mock_cdn_config/modules/varnish/templates/default.vcl.erb
@@ -55,7 +55,7 @@ backend sick_force_grace {
# line-by-line, otherwise we'll have trouble maintaining parity.
acl purge {
- "192.168.0.1";
+ "192.168.0.1"/32;
@dcarley
dcarley / Gemfile
Created September 28, 2015 10:28
bosh_cli
source "https://rubygems.org"
gem "bosh_cli", "1.3056.0"
@dcarley
dcarley / disable_anull_ciphers.patch
Created September 24, 2015 08:00
git commit - Disable Nginx SSL/TLS aNULL ciphers
commit a23477e06eecc147927143d07e76a412039e462b
Author: Dan Carley <dan.carley@gmail.com>
Date: Wed Mar 26 08:17:41 2014 +0000
[#68243876] Disable Nginx SSL/TLS aNULL ciphers
NB: This commits contains a lot of output and references NOT because I know
what I'm doing with SSL ciphers. Quite the opposite.
The upgrade of machines from Lucid to Precise for Platform1 introduced a
python -m trace -t $(which ansible-galaxy) install -r requirements.yml --force
--- modulename: socket, funcname: meth
socket.py(224): return getattr(self._sock,name)(*args)
ssl.py(568): except (OSError, ValueError):
urllib2.py(1195): except socket.error, err: # XXX what error?
urllib2.py(1196): h.close()
--- modulename: httplib, funcname: close
httplib.py(800): if self.sock:
httplib.py(801): self.sock.close() # close it manually... there may be other refs
<?xml version="1.0" encoding="UTF-8"?>
<Environment
xmlns="http://schemas.dmtf.org/ovf/environment/1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:oe="http://schemas.dmtf.org/ovf/environment/1"
xmlns:ve="http://www.vmware.com/schema/ovfenv"
oe:id=""
ve:vCenterId="vm-378847">
<PlatformSection>
<Kind>VMware ESXi</Kind>
@dcarley
dcarley / gist:3f97c24c489b0681c39a
Created September 16, 2014 10:57
GOV.UK IPv6 bare redirect
dan@vps:~$ curl -vkgL -H "Host: gov.uk" -o/dev/null https://\[2400:cb00:2048:1::6810:1931\]
* Rebuilt URL to: https://[2400:cb00:2048:1::6810:1931]/
* Hostname was NOT found in DNS cache
* Trying 2400:cb00:2048:1::6810:1931...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
* Connected to 2400:cb00:2048:1::6810:1931 (2400:cb00:2048:1::6810:1931) port 443 (#0)
* successfully set certificate verify locations:
* CAfile: none
➜ ~ sw_vers -productVersion
10.8.5
➜ ~ ls -l /System/Library/Frameworks/Ruby.framework/Versions/
total 8
drwxr-xr-x 7 root wheel 238 28 Jul 08:55 1.8
lrwxr-xr-x 1 root wheel 3 11 Mar 2013 Current -> 1.8