Skip to content

Instantly share code, notes, and snippets.

View gerhard's full-sized avatar

Gerhard Lazu gerhard

View GitHub Profile
@gerhard
gerhard / nginx.conf
Last active August 29, 2015 14:10 — forked from plentz/nginx.conf
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@gerhard
gerhard / bosh_cf_service_terminologies.md
Created October 15, 2014 14:31
Bosh/CF service terminologies

Service

External process type which provides functionality to a CF application. MySQL, Redis, RabbitMQ, Hadoop are examples of services.

Service Instance

Allocation of a service type resource which is shared by instances of one or more CF applications. For example, multiple instances of the same Rails application would share a single MySQL service instance. A Rails web process will share the same MySQL instance with a Rails worker process. When deployed to CF, these web and worker processes will appear as 2 separate applications.

Service Instance Binding

@gerhard
gerhard / the_way_cloudcredo_developers_work.md
Last active August 29, 2015 14:07
The way CloudCredo developers work

This description of "the way we work" is targeted at new CloudCredoers, developers from other organisations that we pair with and other people which are interested in this process.

Inception

Every project stage starts with an Inception. Each project stage normally spans 3 months.

In an inception we talk about Goals, Non-goals, Risks, Actors, Activities and Stories.

The outcome of the Inception are pointed Stories the team can start working on straight away.

@gerhard
gerhard / servers.rb
Last active August 29, 2015 14:02
Servers from hash - ordering, match by name
Server = Struct.new(:ami, :name, :created_at) do
def self.from_aws(ami_name_created_at)
ami, name, created_at_string = ami_name_created_at[0], *ami_name_created_at[1].split(" ")
new(ami, name, Time.parse(created_at_string))
end
end
class Servers
def self.from_aws_hash(hash)
new(hash.map(&Server.method(:from_aws)))
### Keybase proof
I hereby claim:
* I am gerhard on github.
* I am gerhard (https://keybase.io/gerhard) on keybase.
* I have a public key whose fingerprint is 6224 6FEB B789 9C1F A270 C1CE DA0C AD31 A4BC B3FF
To claim this, I am signing this object:
---
- name: Register New Relic repository.
get_url: url=http://download.newrelic.com/debian/newrelic.list
dest=/etc/apt/sources.list.d/newrelic.list
- name: Download repo key.
apt_key: url=http://download.newrelic.com/548C16BF.gpg
- name: Install New Relic.
apt: pkg=newrelic-sysmond update_cache=yes
class Thing
def execute
stubbed_method
end
end
MyException = Class.new(StandardError)
describe Thing do
subject(:thing) { Thing.new }
@gerhard
gerhard / ruby.2.0.0p353.rspec.3.0.0.beta1.segmentation.fault.log
Last active December 30, 2015 21:59
Ruby 2.0.0-p353 Segmentation fault (rspec-3.0.0-beta1)
This file has been truncated, but you can view the full file.
/Users/gerhard/CambridgeHealthcare/sms/spec/interactors/send_sms_spec.rb:6: [BUG] Segmentation fault
ruby 2.0.0p353 (2013-11-22 revision 43784) [x86_64-darwin12.5.0]
-- Crash Report log information --------------------------------------------
See Crash Report log file under the one of following:
* ~/Library/Logs/CrashReporter
* /Library/Logs/CrashReporter
* ~/Library/Logs/DiagnosticReports
* /Library/Logs/DiagnosticReports
the more detail of.
@gerhard
gerhard / deliver.rails.build.sh
Created October 24, 2013 18:57
Asset packaging in Rails integrated with deliver
#!/usr/bin/env bash
set -e
production_tag="production"
current_build="$production_tag"
compiled_assets_commit_message="Compiled assets"
############################################################################## EXEC #