Skip to content

Instantly share code, notes, and snippets.

@textarcana
textarcana / cucumber_cheatsheet.markdown
Created December 22, 2009 01:47
Cucumber cheatsheet

Cucumber cheatsheet

Best cheatsheet is: cucumber --help

Output formats

Reporting

Notification formats, in increasing order of verbosity:

@jordansissel
jordansissel / solrserver-client.feature
Created November 20, 2010 07:37
cucumber for production tests
Feature: solrserver remote health
In order to remotely ensure a healthy solrserver
As a client talking to the solrserver
I want to ensure solrserver is responsive
Scenario: Check the status of solrserver
Given a dns name of "solr"
And requests timeout after 2 seconds
When I fetch "http://solr:8983/solr/admin/cores?action=status" for each dns entry
Then there should be no timeouts
@jedi4ever
jedi4ever / rakelogger.rb
Created March 17, 2011 12:15
could not find a good example on the new rake integration + integrated logging It's ugly but working
class RakeLogger < Vagrant::UI
def initialize(env,logger)
super(env)
@logger = logger
end
[[:warn, :yellow], [:error, :red], [:info, nil], [:confirm, :green]].each do |method, color|
class_eval <<-CODE
def #{method}(message, opts=nil)
@logger.warn("\#{line_reset}\#{format_message(message, opts)}")
# Use Chef resources in an application via solo mode.
# Could also be configured in client mode, and then use a server.
require 'rubygems'
require 'chef'
require 'chef/client'
require 'chef/run_context'
Chef::Config[:solo] = true
Chef::Config[:log_level] = :info
@fnichol
fnichol / macosx_bootstrap.sh
Last active January 31, 2022 21:09
Mac OS X 10.7/10.8/10.9 (Lion/Mountain Lion/Mavericks) Bootstrapping
#!/usr/bin/env bash
set -e
# # Mac OS X 10.7/10.8/10.9/10.10 Bootstrapping
#
# ## Pre-requisites
#
# 1. Set your hostname: In **System Preferences** go to **Sharing** and enter
# the name in **Computer Name**
# 2. Run **Software Update** and reboot if necessary
@jimbojsb
jimbojsb / gist:1630790
Created January 18, 2012 03:52
Code highlighting for Keynote presentations

Step 0:

Get Homebrew installed on your mac if you don't already have it

Step 1:

Install highlight. "brew install highlight". (This brings down Lua and Boost as well)

Step 2:

@karussell
karussell / Query-DSL-elasticsearch.txt
Last active May 7, 2020 10:25
Bird's Eye View on ElasticSearch its Query DSL
Several times in a month there pop up questions regarding query structure on the ElasticSearch user group.
Although there are good docs explaining this in depth probably the bird view of the Query DSL is necessary to
understand what is written there. There is even already some good external documentation available:
http://www.elasticsearch.org/tutorials/2011/08/28/query-dsl-explained.html
And there were attempts to define a schema:
http://groups.google.com/group/json-schema/browse_thread/thread/ae498ee818155d50
https://gist.github.com/8887766ca0e7052814b0
@jordansissel
jordansissel / building-it
Created March 1, 2012 00:57
FPM's new API allows you to compose multiple packages into one
% ruby multiple-to-rpm.rb thin sinatra cabin json
Trying to download {"gem":"thin","version":null,"level":"info"}
Using gem file {"path":"/home/jls/.rvm/gems/ruby-1.9.3-p0/cache/thin-1.3.1.gem","level":"info"}
Building native extensions. This could take a while...
Successfully installed thin-1.3.1
1 gem installed
Trying to download {"gem":"sinatra","version":null,"level":"info"}
Using gem file {"path":"/home/jls/.rvm/gems/ruby-1.9.3-p0/cache/sinatra-1.3.2.gem","level":"info"}
Successfully installed sinatra-1.3.2
1 gem installed
@DAddYE
DAddYE / hack.sh
Created March 19, 2012 11:31
OSX For Hackers
#!/bin/sh
##
# This is a script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# Run in interactive mode with:
# $ sh -c "$(curl -sL https://raw.github.com/gist/2108403/hack.sh)"
#
# or run it without prompt questions:
@erikh
erikh / hack.sh
Created March 31, 2012 07:02 — forked from DAddYE/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#