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
# | |
# 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
#!/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
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
id: ghost | |
kind: Service | |
apiVersion: v1beta1 | |
selector: | |
app: ghost | |
labels: | |
app: ghost | |
containerPort: 2368 | |
port: 2368 |
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: Service | |
apiVersion: v1beta1 | |
selector: | |
app: frontend | |
labels: | |
app: frontend | |
containerPort: 80 | |
port: 80 | |
publicIPs: |
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 b62 | |
import ( | |
"math" | |
"testing" | |
) | |
const alphabet = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" | |
func base62EncodeB(num int) []byte { |
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 myInt int | |
func (i myInt) square() myInt { | |
return i*i |
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
func CriticalDataManager(cmdchan chan CriticalCommand) { | |
queued := new(vector.Vector) | |
critical := 0 | |
for { | |
var rawcmd CriticalCommand | |
if critical == 0 && queued.Len() > 0 { | |
// Process the queued-up commands when we aren't in critical section | |
rawcmd := queued.At(0) | |
queued.Delete(0) | |
} else { |
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
==> ./sub/ctpkg.c <== | |
#include <stdio.h> | |
void PrintIt() { | |
printf("PASS\n"); | |
} | |
==> ./sub/cgotpkg.go <== | |
package tpkg |
OlderNewer