Skip to content

Instantly share code, notes, and snippets.

View daemonza's full-sized avatar

Werner Gillmer daemonza

View GitHub Profile
@daemonza
daemonza / haproxy.cfg
Created March 6, 2012 07:57
HAproxy virtual site load balancing
# This configuration use acl's to distinguish between url's passwd and then route
# them to the right backend servers. For the backend servers to handle it correctly, you
# need to setup virtual hosting there as well, on whatever you use, tomcat, nginx, apache, etc.
# For this to work with SSL, put pound before HAproxy and use a configuration file similar to
# https://gist.github.com/1984822 to get it working
global
log 127.0.0.1 local0
log 127.0.0.1 local1 info
maxconn 4096
@daemonza
daemonza / pound.cfg
Created March 6, 2012 08:00
Pound SSL redirect configuration file
######################################################################
# Pound configuration to route SSL requests to HAproxy and then let
# HAproxy load balance the rest of the services.
#
## global options:
User "www-data"
Group "www-data"
#RootJail "/chroot/pound"
@daemonza
daemonza / gist:3878849
Created October 12, 2012 11:47
Script to make uploads of tcx files from garmin connect easier
#!/usr/bin/env bash
# Copy the script into the directory where all your tcx files
# are located. Run it and then upload to Stava from the upload directory.
# Coded by Werner Gillmer <werner.gillmer@gmail.com>
echo "Creating sorting directories"
nrFiles=`ls -l ./*.tcx | wc -l`
nrDirs=$(($nrFiles/24))
@daemonza
daemonza / Vagrantfile
Created February 12, 2014 15:56
Serf vagrant play area
# Basic Debian box with serf installed in $PATH
# Werner Gillmer <w.gillmer@onehippo.com>
Vagrant::Config.run do |config|
puts "------------------------------------------------"
puts "Serf playground machine "
puts "http://www.serfdom.io/ "
puts "Look at : http://www.serfdom.io/intro/index.html"
puts "------------------------------------------------"
Vagrant::Config.run do |config|
## MySQL
config.vm.define :puppetdev do |puppetdev|
puppetdev.vm.box = "debian-wheezy"
puppetdev.vm.box_url = "https://www.dropbox.com/s/23gupgb0xompvkm/Wheezy64.box?dl=1"
puppetdev.vm.host_name = "puppetdev.lan"
puppetdev.vm.network :hostonly, "192.168.1.10"
#!/usr/bin/env bash
function one {
if [ $1 == "test" ]; then
return 0
else
return 1
fi
}
ubuntu@ip-10-140-195-69:~/cf-setup$ bundle exec bosh aws create
Executing migration CreateKeyPairs
allocating 1 KeyPair(s)
Executing migration CreateVpc
Waiting for vpc, continuing after AWS::EC2::Errors::InvalidVpcID::NotFound: The vpc ID 'vpc-f4c46091' does not exist
creating internet gateway
creating security groups: open, bosh, bat, cf, web
creating subnets: bosh1, bosh_rds1, cf_elb1, cf_rds1, services_rds1, cf1, services1, bosh_rds2, cf_elb2, cf_rds2, services_rds2
Making subnet bosh1 10.10.0.0/24:
Making subnet bosh_rds1 10.10.1.0/24:
VERSION:
6.1.2-6a013ca
REQUEST: [2014-07-25T10:49:18+02:00]
POST /oauth/token HTTP/1.1
Host: login.cf.hip-od2.com
Accept: application/json
Authorization: [PRIVATE DATA HIDDEN]
Content-Type: application/x-www-form-urlencoded
@daemonza
daemonza / gist:77309d40f3a78b06c4a9
Created July 25, 2014 14:52
Use of entity>error is deprecated in favor of entity>error_details
fgrep -R 9ad1f3f5-741e-405b-7c48-803d53934aa0::fbed6430-ccb8-4485-9a3c-d08c457d6797 ./*
./cloud_controller_ng/cloud_controller_ng.log:{"timestamp":1406299203.241722,"message":"(0.000826s) SELECT * FROM `users` WHERE (`guid` = '6515a6d1-225d-404e-8afd-8015769542ec') LIMIT 1","log_level":"debug2","source":"cc.db","data":{"request_guid":"9ad1f3f5-741e-405b-7c48-803d53934aa0::fbed6430-ccb8-4485-9a3c-d08c457d6797"},"thread_id":28225480,"fiber_id":28383300,"process_id":1366,"file":"/var/vcap/packages/cloud_controller_ng/cloud_controller_ng/vendor/bundle/ruby/1.9.1/gems/sequel-4.11.0/lib/sequel/database/logging.rb","lineno":70,"method":"block in log_each"}
./cloud_controller_ng/cloud_controller_ng.log:{"timestamp":1406299203.2425063,"message":"dispatch VCAP::CloudController::JobsController get /v2/jobs/:guid","log_level":"debug","source":"cc.api","data":{"request_guid":"9ad1f3f5-741e-405b-7c48-803d53934aa0::fbed6430-ccb8-4485-9a3c-d08c457d6797"},"thread_id":28225480,"fiber_id":28383300,"process_id":1366,"file":"/va
compilation:
cloud_properties:
availability_zone: us-east-1c
instance_type: c1.medium
network: cf1
reuse_compilation_vms: true
workers: 6
director_uuid: 93b4e1fa-3bcd-4b5d-93e9-6a5cfed0ac59
jobs:
- default_networks: