brew install git bash-completion
Configure things:
git config --global user.name "Your Name"
git config --global user.email "you@example.com"
var error = new Error; | |
Object.defineProperty(global, '__stack', { | |
get: function(){ | |
Error.prepareStackTrace = function(err, frames){ | |
err.frames = frames; | |
}; | |
try { | |
throw error; | |
} catch (err) { |
class MyGem | |
class << self | |
attr_accessor :color | |
end | |
def self.configure(&block) | |
instance_eval(&block) | |
end | |
end |
#!/usr/bin/ruby1.9 | |
require 'fiber' | |
require 'benchmark' | |
class Ring | |
attr_reader :id | |
attr_accessor :attach | |
def initialize(id) |
Feature: Basic feature execution | |
In order to do BDD | |
As a cucumber afficionado | |
I want to run basic cucumber features | |
# 1. Not abstract enough: first step is language dependent | |
Scenario: Simple flat steps | |
Given the following step definition: | |
""" | |
When(/a step passes/, function() { |
brew install git bash-completion
Configure things:
git config --global user.name "Your Name"
git config --global user.email "you@example.com"
This playbook has been removed as it is now very outdated. |
Locate the section for your github remote in the .git/config
file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = git@github.com:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
-- show running queries (pre 9.2) | |
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
FROM pg_stat_activity | |
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
ORDER BY query_start desc; | |
-- show running queries (9.2) | |
SELECT pid, age(clock_timestamp(), query_start), usename, query | |
FROM pg_stat_activity | |
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
Let's have some command-line fun with curl, [jq][1], and the [new GitHub Search API][2].
Today we're looking for:
-module(atkin). | |
-export([primes_smaller_than/1]). | |
primes_smaller_than(Limit) -> | |
primes_smaller_than(Limit, sieve(Limit), []). | |
primes_smaller_than(0, _, Acc) -> | |
Acc; | |
primes_smaller_than(N, Bin, Acc) -> |