Skip to content

Instantly share code, notes, and snippets.

View vchrisb's full-sized avatar

Christopher Banck vchrisb

View GitHub Profile
{"keys":[{"kty":"RSA","e":"AQAB","use":"sig","kid":"key-id-1","n":"MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA6bvO1ptxcTJr03WXHpzJ3M2y/UhnE6J4qpR1gdUQZxp4fDS6r7NPBacpZtJAphStOrl0VtUNWwXF/blX2m09H1Z6gLyo8hSAqk7htN+wr38OR+mR2hiydwh+chlUXwss6KucwAJa1GqwvK7S5ZXFJGKku+TgwdIgBnekUvauLLe+YGdGisKEiUhOc0XMdoqAGEauT1UOkMkpgAxLA2JX7+Nnwwr0xoW+dGQfvT+GhrVmVS+0Lz8d6iVB5nx5rMCq2RbMqesuJxecnjaAyqFrKHernV23vVrsjp8sCl7qMPNpyrT2uB3LopzXQND4HuBCLsDoDN+w10rWem/bte68KQIDAQAB"}]}
#dnsmasq
brew install dnsmasq
echo "listen-address=127.0.0.1" >> $(brew --prefix)/etc/dnsmasq.conf
echo "port=5354" >> $(brew --prefix)/etc/dnsmasq.conf
sudo brew services start dnsmasq
sudo mkdir -v /etc/resolver
sudo tee -a /etc/resolver/local <<EOF

Command to create a Minio Gateway to GCS from command line

variables

INSTANCE="minio-gw"
PROJECT=<project>
CRED_FILE="minio.key.json"
BUCKET="<bucket>"
SERVICE_ACCOUNT="<service account>"
ZONE="us-east1-b"
#!/bin/bash
USER=$(curl -s http://metadata.google.internal/computeMetadata/v1/instance/attributes/ssh-keys -H "Metadata-Flavor: Google" | cut -d: -f1)
[ -x /home/$USER/.vnc ] && exit
sudo apt-get -q update
sudo apt-get -yq install xfce4 xfce4-goodies firefox tightvncserver autocutsel
PASS=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 16 | head -n 1)
echo "VNCServerPassword: $PASS"
@vchrisb
vchrisb / cf-networking-bosh-lite.yml
Last active November 26, 2018 18:06
A bosh ops file to allow cloud foundry networking for bosh-lite
# add cf-networking release
- type: replace
path: /releases/-
value:
name: cf-networking
sha1: 689ff1050b49513d5fe889b9655803bcdd265824
url: https://bosh.io/d/github.com/cloudfoundry-incubator/cf-networking-release?v=0.18.0
version: "0.18.0"
- type: replace
#!/bin/bash
#stopping container
echo "Stopping Container: nginx nginx-gen nginx-letsencrypt"
sudo docker stop nginx nginx-gen nginx-letsencrypt
#delete
echo "Deleting Container: nginx nginx-gen nginx-letsencrypt"
sudo docker rm -f nginx nginx-gen nginx-letsencrypt
#!/bin/bash
#stopping container
echo "Stopping Container: wordpress1_mariadb wordpress_html"
sudo docker stop wordpress_mariadb wordpress_html
#delete
echo "Deleting Container: wordpress1_mariadb wordpress_html"
sudo docker rm -f wordpress_mariadb wordpress_html
#!/bin/bash
echo "Updating images:"
docker images | grep -v '^<none>' | grep -v '^REPOSITORY' | awk '{print $1}' | xargs -L1 docker pull | grep 'Status'
echo -e "\nChecking if a container is not running the latest image:"
CIDS=$(docker ps | grep -v '^CONTAINER ID' | awk '{print $1}')
for CID in $CIDS
do
RUNNING=`docker inspect --type=container --format "{{.Image}}" $CID`
IMAGE=`docker inspect --type=container --format "{{.Config.Image}}" $CID`
git clone https://github.com/vchrisb/vagrant-coprhd.git
vagrant plugin install vagrant-cachier
vagrant plugin install sahara