Skip to content

Instantly share code, notes, and snippets.

View keybase.md

Keybase proof

I hereby claim:

  • I am craigfurman on github.
  • I am craigfurman (https://keybase.io/craigfurman) on keybase.
  • I have a public key ASBV_NaR1wAph0IABRagkJVrX8jKeZ_Y7QRfUSU2ii_fswo

To claim this, I am signing this object:

@craigfurman
craigfurman / gotta-push-em-all.sh
Created Oct 16, 2017
Push all submodules, old school
View gotta-push-em-all.sh
#!/bin/bash
set -euo pipefail
for sub in $(git submodule | awk '{print $2}'); do
(
cd "$sub"
if git status | grep "Your branch is ahead of" >/dev/null 2>&1 ; then
git push
fi
)
@craigfurman
craigfurman / 0001-Update-to-version-6.32.0.patch
Created Oct 4, 2017
bump CF CLI version in AUR package
View 0001-Update-to-version-6.32.0.patch
From 5fbff5f152bc032c54dce72623d9a047e0596138 Mon Sep 17 00:00:00 2001
From: Craig Furman <craig.furman89@gmail.com>
Date: Wed, 4 Oct 2017 18:00:13 +0100
Subject: [PATCH] Update to version 6.32.0
---
.SRCINFO | 18 ++++++++----------
PKGBUILD | 10 +++++-----
2 files changed, 13 insertions(+), 15 deletions(-)
@craigfurman
craigfurman / garden-unix-sockets.md
Last active Aug 30, 2017
Thoughts on how we use unix sockets in garden-runc.
View garden-unix-sockets.md

General Notes

  1. The unix socket is executable. Let's change this.
  2. All users have read+write permissions on the socket. This has been the case for a long time. I deployed grr 1.0.0, and as expected we don't chmod the socket in our bosh release there. As far as I can see we never have.
  3. Its default path is /var/vcap/data/garden/garden.sock. This default is unchanged in typical CF deployments. The ancestor dirs in that default path
@craigfurman
craigfurman / firehose.go
Created Jun 12, 2017
Process CF firehose while pushing app
View firehose.go
package main
import (
"crypto/tls"
"fmt"
"os"
"os/exec"
"github.com/cloudfoundry/noaa/consumer"
"github.com/cloudfoundry/sonde-go/events"
@craigfurman
craigfurman / update_libs.sh
Last active Sep 21, 2015
Update Go dependencies after installing a new language version
View update_libs.sh
go list -f '{{join .Deps "\n"}}' ./... | xargs go list -f '{{if not .Standard}}{{.ImportPath}}{{end}}' | xargs go install -a