Skip to content

Instantly share code, notes, and snippets.

feature "share documents" do
specify do
Given "Mary is signed in"
...
When "Joe is signed in"
...
end
let(:mary) { "Mary" }
:tddium:
:tests:
- :type: custom
:command: bundle exec rake jasmine:ci
:invocation: single
:output: exit-status
@robb1e
robb1e / gist:3742585
Last active October 10, 2015 19:58
Chef Workstation
pushd `pwd`
if rvm --version 2>/dev/null; then
gem install soloist
else
sudo gem install soloist
fi
mkdir -p ~/cookbooks; cd ~/cookbooks
@robb1e
robb1e / mixin.rb
Created September 5, 2012 03:40
Include and Extend Ruby mixin
module Foo
def say
'foo'
end
end
module Bar
def say
'bar'
end
@robb1e
robb1e / base.scala
Created November 13, 2011 22:01
Creating API docs for scalatra
class HttpMethod
object HttpPostMethod extends HttpMethod { override def toString = "POST" }
object HttpGetMethod extends HttpMethod { override def toString = "GET" }
object HttpDeleteMethod extends HttpMethod { override def toString = "DELETE" }
object HttpPutMethod extends HttpMethod { override def toString = "PUT" }
abstract class Param(){
val name: String
val description: String
@robb1e
robb1e / gist:798467
Created January 27, 2011 12:54
Node.JS connection to Guardian Content API
var connection = http.createClient(80, 'content.guardianapis.com');
var request = connection.request('GET', q.uri, {'host':'content.guardianapis.com'});
request.end();
request.on('response', function(response){
var apiData = "";
response.setEncoding('utf8');
response.on('data', function(chunk){
apiData += chunk;
});
response.on('end', function(){
{ error: null
, ended: false
, maxFieldsSize: 2097152
, keepExtensions: true
, uploadDir: '/tmp'
, encoding: 'utf-8'
, headers:
{ host: 'localhost:3000'
, 'user-agent': 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8'
, accept: 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'
{ error: null
, ended: false
, maxFieldsSize: 2097152
, keepExtensions: true
, uploadDir: '/tmp'
, encoding: 'utf-8'
, headers:
{ host: 'localhost:3000'
, connection: 'keep-alive'
, referer: 'http://localhost:3000/'
/**
* Module dependencies.
*/
var express = require('./../../lib/express'),
form = require('./../../support/connect-form'),
sys = require('sys');
var app = express.createServer(
module LearnBoost mongoose
module christkv node-mongodb-native 78a96e85963f4869a4440355b5bbfb93c8d449a6
mv modules/node-mongodb-native modules/mongoose/lib/support/