Skip to content

Instantly share code, notes, and snippets.

View bbertka's full-sized avatar
🎯
Focusing

Ben Bertka bbertka

🎯
Focusing
View GitHub Profile
@bbertka
bbertka / mstine-enabling-continuous-delivery-scripts.txt
Created February 11, 2016 23:41
Matt Stine - Enabling Continuous Delivery Scripts
# https://www.youtube.com/watch?v=0EZ_JOavLjM
#cassandra-demo-integration-tests/configure
export VCAP_APPLICATION=“”
export REQUIRED_SERVICE_INSTANCES=“p-cassandra:multi-tenant:int-test-cassandra”
. test_service_instances
./gradlew clean integrationTest
Script 2:
@bbertka
bbertka / gist:41a6730cff6462cb77f6
Created December 21, 2015 17:36
CF Lattice API CRUD Demo via Python
# Implements Create, Debug, and Delete Lattice Instance usable from within a Python app
#
import os, jsonr
import requests
# Note these are only a few variables, closer inspection of this Gist will show that there is alot of possibility here based on your app container.
# needed to make requests
auth_header = {'Authorization':'Basic YmJlcnRrYTprYXJtYTE5NzY='}
@bbertka
bbertka / pcf-redis-list.py
Created December 10, 2015 18:29
Python Redis List for Pivotal Cloud Foundry
import json, os
import redis
from redis_collections import List
MAX = 50
# Authenticate and create redis object (assuming PCF service)
creds = json.loads(os.environ['VCAP_SERVICES'])['p-redis'][0]['credentials']
r = redis.StrictRedis(host=creds['host'], port=creds['port'], password=creds['password'], db=0)
@bbertka
bbertka / cf-SpringBootTrader-SCS.yml
Created July 22, 2015 22:21
SCS version of Spring Boot Trader App
---
timeout: 180
instances: 1
memory: 512M
env:
SPRING_PROFILES_DEFAULT: cloud
JAVA_OPTS: -Djava.security.egd=file:///dev/urandom
applications:
- name: quotes-${random-word}
path: springboottrades-quotes/build/libs/quotes-0.2.jar