This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
root@ubuntu-2gb-sfo1-01:~# apt-get update && apt-get install -y git curl | |
<output trimmed> | |
root@ubuntu-2gb-sfo1-01:~# curl -O https://storage.googleapis.com/golang/go1.5.3.linux-amd64.tar.gz | |
<output trimmed> | |
root@ubuntu-2gb-sfo1-01:~# tar -zxf go1.5.3.linux-amd64.tar.gz | |
root@ubuntu-2gb-sfo1-01:~# mv go /usr/local | |
root@ubuntu-2gb-sfo1-01:~# export PATH=$PATH:/usr/local/go/bin | |
root@ubuntu-2gb-sfo1-01:~# mkdir gopath | |
root@ubuntu-2gb-sfo1-01:~# export GOPATH=/root/gopath | |
root@ubuntu-2gb-sfo1-01:~# go get github.com/dpetersen/headerbug/client |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
docker rm -v $(docker ps -q -f status=exited) | |
docker rmi $(docker images -q -f "dangling=true") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
commit 744cfc17ad795077a427b19d02c10e4f0b5008b7 | |
Author: Don Petersen <[email protected]> | |
Date: Tue Mar 10 15:43:22 2015 -0600 | |
Include circle-compatible test output. | |
diff --git a/circle.yml b/circle.yml | |
index a2763cf..ece9b30 100644 | |
--- a/circle.yml | |
+++ b/circle.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
) | |
type Cat struct { | |
Angry bool `json:"angry"` | |
Declawed bool `json:"declawed"` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#![feature(core)] | |
// This triggers: | |
// add #![feature(core)] to the crate attributes to silence this warning | |
// warning: use of unstable library feature 'core': naming scheme needs to be revisited | |
use std::f64::consts::PI; | |
fn main() { | |
println!("Hello, world! {}", PI); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package demo | |
// The Savable interface should be implemented by any resource associated with | |
// an Account that can be persisted. | |
type Savable interface { | |
Save(Account) (string, error) | |
} | |
// An Account ties together all records associated with a single client. | |
// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import "fmt" | |
type Fetchable interface { | |
URL() string | |
} | |
type Completable interface { | |
HasCompleted() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--color |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
begin | |
require 'rubygems' | |
require 'cane/cli' | |
rescue LoadError | |
warn "You're missing a dependency, either rubygems or cane!" | |
end | |
`git stash -u --keep-index` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe User do | |
describe "#can_do_dangerous_stuff?" do | |
subject { user.can_do_dangerous_stuff? } | |
context "when the User is a customer" do | |
let(:user) { User.new("customer") } | |
it { should be_false } | |
end | |
context "when the User is an admin" do |
NewerOlder