Skip to content

Instantly share code, notes, and snippets.

💭
🏆Platinum Status Level

Dr Nic Williams drnic

💭
🏆Platinum Status Level
Block or report user

Report or block drnic

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@drnic
drnic / buildpack-sidecar-walkthru.md
Last active Jun 19, 2019
Walk thru for CAB call to create a buildpack for etcd proxy and run it as a Cloud Foundry sidecar
View buildpack-sidecar-walkthru.md

Distributing sidecars with buildpacks

Slides are at https://speakerdeck.com/drnic/distributing-cloud-foundry-sidecars-with-buildpacks

What are sidecars? How to use them in Cloud Foundry? - by Tim Downey

Intro to sidecars from last CAB

  • until recently a running app container only ran and monitored a single process
  • You could manually fork off child processs but they weren’t monitored (static file buildpack starts nginx and also starts cat-ting logs to stdout
  • Secondary processes inside containers are now first class citizens
@drnic
drnic / update-cf-capi.sh
Last active May 19, 2019
Upgrade cfdev 0.0.15 to support sidecars (capi 1.79.0)
View update-cf-capi.sh
#!/bin/bash
export BOSH_DEPLOYMENT=${CF_DEPLOYMENT:-cf}
# https://github.com/cloudfoundry/cf-deployment/blob/v7.11.0/operations/use-compiled-releases.yml#L1-L9
capi_update=$(cat <<-YAML
- type: replace
path: /releases/name=capi/url
value: https://storage.googleapis.com/cf-deployment-compiled-releases/capi-1.79.0-ubuntu-xenial-250.29-20190411-165538-039089481.tgz
- type: replace
@drnic
drnic / Gemfile
Created Apr 26, 2019
Tiny demo app
View Gemfile
source "https://rubygems.org"
gem "sinatra"
View macos-sitl-docs.md

OSD

./Tools/autotest/sim_vehicle.py -v ArduPlane -L CMAC --map --console --osd
...
Missing SFML libraries - please install libsfml-dev

--osd flag requires libsfml-dev, which can be installed with homebrew sfml package:

@drnic
drnic / ardupilot-sitl-osx-macos.md
Last active Feb 20, 2019
Instructions for running Ardupilot Simulation SITL within MacOS using XQuartz and Vagrant
View ardupilot-sitl-osx-macos.md
@drnic
drnic / build-default.yaml
Last active Nov 11, 2018
Comparison of two Knative Builds - "build-default.yml" is a no-template build with explicit steps; "buildpack.yml" uses the pre-installed https://raw.githubusercontent.com/knative/build-templates/master/buildpack/buildpack.yaml build-template
View build-default.yaml
apiVersion: build.knative.dev/v1alpha1
kind: Build
metadata:
creationTimestamp: 2018-11-11T23:25:45Z
generateName: simple-app-
generation: 1
name: simple-app-7s8pf
namespace: default
resourceVersion: "14435"
selfLink: /apis/build.knative.dev/v1alpha1/namespaces/default/builds/simple-app-7s8pf
@drnic
drnic / bootstrap-gke.sh
Last active Nov 16, 2018
Bootstrap Kube/Helm/Service Catalog/Knative on GKE
View bootstrap-gke.sh
#!/bin/bash
set -eu
export CLUSTER_NAME=${CLUSTER_NAME:-knative}
export CLUSTER_REGION=${CLUSTER_REGION:-us-west1}
export CLUSTER_ZONE=${CLUSTER_ZONE:-us-west1-c}
usage() {
echo "Bootstrap Kube/Helm/Knative on GKE"
View martinez-error.js
var martinez = require('martinez-polygon-clipping');
// https://skyvector.com/?fpl=3529S14100E%203556S14216E%203557S14217E%203558S14222E%203650S14259E%203658S14256E%203730S14251E%203720S14319E%203714S14356E%203705S14444E%203712S14510E%203627S14548E%203559S14623E%203553S14610E%203544S14547E%203535S14525E%203526S14502E%203516S14440E%203507S14417E%203458S14355E%203448S14333E%203438S14311E%203429S14249E%203419S14227E%203409S14205E%203359S14143E%203349S14122E%203339S14100E%203529S14100E
var big = [ [ 141, -35.49 ],
[ 142.27, -35.93 ],
[ 142.28, -35.95 ],
[ 142.37, -35.97 ],
[ 142.98, -36.83 ],
[ 142.93, -36.97 ],
[ 142.85, -37.5 ],
@drnic
drnic / readme.md
Last active Jul 23, 2018
Stop all Cloud Foundry applications in any spaces with "staging" in their name
View readme.md
curl -sL https://gist.githubusercontent.com/drnic/b42bbcda9b47bd2241cdc41cdfd4abed/raw/c5c2e27377c43bdd04dd86463ca48cce3677580d/run.sh | bash
You can’t perform that action at this time.