This file contains hidden or 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
--- | |
apiVersion: v1 | |
kind: ReplicationController | |
metadata: | |
labels: | |
k8s-app: kube-dns | |
kubernetes.io/cluster-service: "true" | |
version: v5 | |
name: kube-dns-v5 | |
namespace: kube-system |
This file contains hidden or 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
#cloud-config | |
--- | |
ssh_authorized_keys: | |
- ssh-rsa xxxx | |
write_files: | |
- path: /opt/bin/waiter.sh | |
owner: root | |
content: | | |
#! /usr/bin/bash |
This file contains hidden or 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
type Project struct { | |
XMLName struct{} `xml:"http://maven.apache.org/POM/4.0.0 project"` | |
SchemaLocation string `xml:"http://www.w3.org/2001/XMLSchema-instance schemaLocation,attr"` | |
ModelVersion string `xml:"modelVersion"` | |
GroupID string `xml:"groupId"` | |
ArtifactID string `xml:"artifactId"` | |
Version string `xml:"version"` | |
Packaging string `xml:"packaging"` | |
Properties Properties `xml:"properties"` | |
DependencyManagement DependencyManagement `xml:"dependencyManagement"` |
This file contains hidden or 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
FROM ubuntu | |
MAINTAINER "Mark Petrovic <[email protected]>" | |
# Install packages | |
RUN echo "deb http://elided/ubuntu/xoom /" > /etc/apt/sources.list.d/xoom.list | |
RUN apt-get update && apt-get install -y --force-yes golang=1.3.3 openssl ca-certificates mercurial git openjdk-7-jre gcc build-essential ruby ruby-dev cmake pkg-config libssl-dev | |
# Environment | |
ENV PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/go/bin:/go/bin | |
ENV GOPATH /go |
This file contains hidden or 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 lifecycle | |
import ( | |
"log" | |
"os" | |
"os/signal" | |
) | |
var targets []Shutdowner |
This file contains hidden or 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
If you replace a default function in a package for unit testing purposes, make sure you | |
restore it so the next test does not mistakenly inherit the reassignment: | |
func TestEndpointNoScopes(t *testing.T) { | |
saveAuth := auth | |
defer func() { | |
auth = saveAuth | |
}() | |
auth = func(*http.Request, []string) (bool, error) { |
This file contains hidden or 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
VERSION := 1.0 | |
DATE := $(shell date) | |
COMMIT_ID := $(shell git rev-parse --short HEAD) | |
SDK_INFO := $(shell go version) | |
BUILD_DIR=build | |
LD_FLAGS := -X github.com/xoom/gorest/rest.version $(VERSION) -X github.com/xoom/gorest/rest.commit $(COMMIT_ID) -X github.com/xoom/gorest/rest.buildTime '$(DATE)' -X github.com/xoom/gorest/rest.sdkInfo '$(SDK_INFO)' |
This file contains hidden or 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
FROM phusion/baseimage:0.9.15 | |
RUN apt-get -y update && apt-get install -y git | |
RUN git clone https://github.com/ae6rt/go-mode.el.git |
This file contains hidden or 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
func Exec(cmd string, args ...string) ([]byte, []byte, error) { | |
if debug { | |
log.Printf("%s %v\n", cmd, args) | |
} | |
stdout := &bytes.Buffer{} | |
stderr := &bytes.Buffer{} | |
command := exec.Command(cmd, args...) | |
command.Stdout = stdout | |
command.Stderr = stderr |
This file contains hidden or 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
func GetBranches() ([]string, error) { | |
cmd := "git" | |
args := []string{"ls-remote", "--heads"} | |
if debug { | |
log.Printf("%s %v\n", cmd, args) | |
} | |
command := exec.Command(cmd, args...) | |
if data, err := command.Output(); err != nil { | |
return nil, err |