Skip to content

Instantly share code, notes, and snippets.

View fordaz's full-sized avatar

Fermin Ordaz fordaz

View GitHub Profile
@fordaz
fordaz / gist:e3be685e86c9e86ad1f1
Created January 4, 2016 23:14
Sample haproxy config with stats
global
log 127.0.0.1 syslog debug
daemon
user vcap
group vcap
maxconn 64000
spread-checks 4
stats socket /var/run/haproxy.sock mode 600 level admin
stats timeout 2m #Wait up to 2 minutes for input
@fordaz
fordaz / gist:40eddba87b57bdbdf14c
Created January 7, 2016 00:32
access the firehose in bosh lite
/Users/geoss/workspace/cf-release/src/cf-routing-release/src/github.com/cloudfoundry/noaa
go get github.com/cloudfoundry/noaa
658 go build -o bin/firehose_sample firehose_sample/main.go
661 cf oauth_token
662 cf
663 cf | grep token
664 cf oauth-token
665 cf api api.bosh-lite.com --skip-ssl-validation
rtr list --api https://api.bosh-lite.com --client-id tcp-emitter --client-secret tcp-emitter-secret --oauth-url https://uaa.bosh-lite.com
@fordaz
fordaz / gist:1b372e55b4d697ea2d41
Last active January 1, 2017 22:28
UAA key configuration
Generate your private key with any passphrase
openssl genrsa -aes256 -out server.key 1024
Remove passphrase from key
openssl rsa -in server.key -out server.key
Generate certificate signing request for CA
openssl req -x509 -new -key server.key -out server.csr
Generate self-signed certificate with 365 days expiry-time
@fordaz
fordaz / gist:2b3045840ff79e4f2151
Created February 6, 2016 01:39
ideas about dea to diego switch in CC
context 'switch from dea to diego' do
+ let(:app_obj) { AppFactory.make(instances: 1, diego: false) }
+ let(:developer) { make_developer_for_space(app_obj.space) }
+ let(:route) { Route.make(space: app_obj.space) }
+ let(:route_mapping) { RouteMapping.make(app_id: app_obj.id, route_id: route.id) }
+
context 'when user does not specify any ports' do
it 'sets ports to 8080' do
+ expect(RouteMapping.find(guid: route_mapping.guid).app_port).to be_nil
put "/v2/apps/#{app_obj.guid}", '{ "diego": true }', json_headers(headers_for(developer))
@fordaz
fordaz / ffmpeg-concat.sh
Last active January 9, 2017 12:42
concat multiple mp4 into a single one, extract audio as mp3
#!/bin/bash
# default group size (no grouping)
group_size=-1
# required to deal with file names containing blanks
OIFS="$IFS"
IFS=$'\n'
# parsing the -g command line argument
Michael, 29
Andy, 30
Justin, 19
auth:
ssh_user: ubuntu
ssh_private_key: ~/.ssh/<masked_key_file>
cluster_name: default
cluster_synced_files: []
docker:
container_name: ray_container
image: rayproject/ray-ml:latest-gpu
pull_before_run: true
run_options: