Skip to content

Instantly share code, notes, and snippets.

View sleistner's full-sized avatar

Steffen Leistner sleistner

View GitHub Profile
<!--
** DO NOT EDIT THIS FILE
**
** This file was automatically generated by the `build-harness`.
** 1) Make all changes to `README.yaml`
** 2) Run `make init` (you only need to do this once)
** 3) Run`make readme` to rebuild this file.
**

Keybase proof

I hereby claim:

  • I am sleistner on github.
  • I am sleistner (https://keybase.io/sleistner) on keybase.
  • I have a public key ASDy76qUOG9sYmd93gtd2YAAhmzn9jL2OOj8QED-XtOd3Ao

To claim this, I am signing this object:

#!/usr/bin/env bash
SESSION_NAME=run
AWS_REGION=eu-west-1
POSITIONAL=()
while [[ $# -gt 0 ]]; do
key="$1"
case $key in

Commit Message Format Each commit message consists of a header and a body. The header has a special format that includes a type, a scope and a subject:

<type>(<scope>): <subject>
<BLANK LINE>
<body>

The header is mandatory and the scope of the header is optional.

@sleistner
sleistner / git-pristine.sh
Created August 7, 2012 10:26
Remove all remote and local branches except master and next
#!/bin/bash
git branch -d -r `git branch -r | awk '{ if ($0 !~ /next|master/) printf "%s", $0 }'`
git branch -D `git branch | awk '{ if ($0 !~ /next|master/) printf "%s", $0 }'`
@sleistner
sleistner / mongoid_step_definitions.rb
Created February 7, 2011 20:16
factory_girl cucumber step definitions using mongoid
FactoryGirl.factories.values.each do |factory|
if factory.build_class.respond_to?(:fields)
factory.build_class.fields.map(&:first).each do |field|
human_field_name = field.downcase.gsub('_', ' ')
Given /^an? #{factory.human_name} exists with an? #{human_field_name} of "([^"]*)"$/i do |value|
Factory(factory.name, field => value)
end
Given /^(\d+) #{factory.human_name.pluralize} exist with an? #{human_field_name} of "([^"]*)"$/i do |count, value|
count.to_i.times { Factory(factory.name, field => value) }