Skip to content

Instantly share code, notes, and snippets.

View bthelen's full-sized avatar

Bruce E. Thelen bthelen

View GitHub Profile

Keybase proof

I hereby claim:

  • I am bthelen on github.
  • I am bthelen (https://keybase.io/bthelen) on keybase.
  • I have a public key ASApOVaWvQOxLV8-xYneR0TPpOuE2hFYURYlrwzRELtpBwo

To claim this, I am signing this object:

#! /usr/bin/env bash
function waitForServicesToInitialize() {
# Wait until services are ready
while cf services | grep 'create in progress'
do
sleep 10
echo "Waiting for services to initialize..."
done
#! /usr/bin/env bash
set -e
readonly ARGS="$#"
readonly SERVICE="$1"
readonly SERVICE_PLAN="$2"
readonly SERVICE_INSTANCE="$3"
readonly SERVICE_CREDENTIALS_JSON="$4"
readonly PROGNAME=$(basename $0)
@bthelen
bthelen / create-or-update-ups.sh
Last active May 16, 2018 16:47
create-ups-if-not-exist.sh
#! /usr/bin/env bash
set -e
readonly ARGS="$#"
readonly SERVICE_INSTANCE="$1"
readonly CREDENTIALS="$2"
readonly PROGNAME=$(basename $0)
usage() {
@bthelen
bthelen / bet-rabbit-requeue-example.txt
Created April 12, 2018 14:10
Example steps to show how to view RabbitMQ messages without totally removing them
#Run RabbitMQ
docker run -d --hostname my-rabbit -p 15672:15672 rabbitmq:3-management
#Make a queue called foo
curl -s -u guest:guest -H "content-type:application/json" -X PUT http://127.0.0.1:15672/api/queues/%2F/foo
#Put some messages
curl -u guest:guest -H "content-type:application/json" -X POST http://localhost:15672/api/exchanges/%2f/amq.default/publish -d'{"properties":{"delivery_mode":2},"routing_key":"foo","payload":"aaaaaa","payload_encoding":"string"}'
curl -u guest:guest -H "content-type:application/json" -X POST http://localhost:15672/api/exchanges/%2f/amq.default/publish -d'{"properties":{"delivery_mode":2},"routing_key":"foo","payload":"bbbbbb","payload_encoding":"string"}'