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
id: frontend | |
kind: ReplicationController | |
apiVersion: v1beta1 | |
labels: | |
app: frontend | |
desiredState: | |
replicas: 1 | |
replicaSelector: | |
app: frontend | |
podTemplate: |
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 | |
# Always run from the script local directory: | |
cd "$(dirname "${BASH_SOURCE[0]}")" | |
# Constants: | |
IMAGE="yourprefix/imagename" | |
CONTAINER="containername" | |
# Configuration variables: |
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
# | |
# General settings | |
# | |
# Set terminal titles | |
set -g set-titles on | |
# Expect UTF-8 | |
set -g utf8 on |
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" | |
"log" | |
"path/filepath" | |
"runtime" | |
"strings" | |
"unicode" | |
) |
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 foo | |
import "time" | |
// in your main package | |
var timeNow = time.Now | |
// in the _test.go: | |
func init() { | |
// Panic if any tests cause timeNow to be called without stubbing it out |
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" | |
"log" | |
"math/rand" | |
"time" | |
) | |
type Snapshot struct { |
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
$ time ./client_cpp | |
real 1m48.071s | |
user 0m1.955s | |
sys 1m45.919s | |
# ./trace.d | |
dtrace: script './trace.d' matched 22 probes | |
CPU ID FUNCTION:NAME | |
2 1 :BEGIN Tracing... |
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 ( | |
"io" | |
"log" | |
"strings" | |
) | |
type ( | |
Operator string |
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 "net/http" | |
import pathpkg "path" | |
import "strings" | |
type InsensitiveMux struct { | |
handlers map[string]http.Handler | |
isDir map[string]bool | |
} |
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 ( | |
"bytes" | |
"encoding/json" | |
"log" | |
"os" | |
"strings" | |
) |