Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am jghiloni on github.
  • I am joshghiloni (https://keybase.io/joshghiloni) on keybase.
  • I have a public key whose fingerprint is 3818 FF0C 6B0E B0F2 5256 F634 A905 5D72 5BF4 C95A

To claim this, I am signing this object:

BOSH Command Cheat Sheet for PCF 1.8

Logging in

  1. Log in to Ops Manager in the browser
  2. Go to the Ops Manager Director tile
  3. Go to the Status tab and note the IP address of the director VM
  4. Go to the Credentials tab and click the link that says Director Credentials. Note the username and password
  5. SSH into the Ops Manager VM
@jghiloni
jghiloni / example-pipeline.yml
Last active October 11, 2017 19:31
An example of how to build an rootfs tgz suitable for use in concourse with `image_resource` set to `type: s3`
---
resources:
- name: source
type: git
source:
uri: {{git-uri}}
branch: {{git-branch}}
private_key: {{git-private-key}}
- name: s3
@jghiloni
jghiloni / apply-without-errands.sh
Created May 12, 2018 23:27
Use the OM tool to apply changes with errands disabled for THAT RUN ONLY
#!/bin/bash
set -eu
opsman() {
om -t OPSMAN_URL -k -u OPSMAN_USER -p OPSMAN_PASSWORD -f json "$@"
}
OFS=$IFS
IFS=$'\n'
@jghiloni
jghiloni / yaml-nest.go
Created June 7, 2018 03:00
Convert a flat yaml file with property names that have dots in them to a nested structure
package main
import (
"log"
"os"
"strings"
"gopkg.in/yaml.v2"
)
@jghiloni
jghiloni / defer-bash.sh
Created October 19, 2018 18:14
a silly little script to get bash's `trap` function to act a bit like go's `defer` keyword
#!/bin/bash
function defer() {
existing=$(trap -p EXIT | sed -e "s/^trap -- '\(.*\)' EXIT$/\1/" -e "s/\'\\\'\'/'/g")
new="$@"
if [ ! -z "${existing}" ]; then
existing="${existing} ;"
fi