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
apiVersion: extensions/v1beta1 | |
kind: Deployment | |
metadata: | |
name: heapster-v1.2.0 | |
namespace: kube-system | |
labels: | |
k8s-app: heapster | |
kubernetes.io/cluster-service: "true" | |
version: v1.2.0 | |
spec: |
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 goID() int { | |
var buf [64]byte | |
n := runtime.Stack(buf[:], false) | |
idField := strings.Fields(strings.TrimPrefix(string(buf[:n]), "goroutine "))[0] | |
id, err := strconv.Atoi(idField) | |
if err != nil { | |
panic(fmt.Sprintf("cannot get goroutine id: %v", err)) | |
} | |
return id | |
} |
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 python | |
# Copyright (C) 2006 by Johannes Zellner, <johannes@zellner.org> | |
# modified by mac@calmar.ws to fit my output needs | |
# modified by crncosta@carloscosta.org to fit my output needs | |
import sys | |
import os | |
def echo(msg): | |
os.system('echo -n "' + str(msg) + '"') |
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
[[local|localrc]] | |
# ======================== | |
# All-in-one-node | |
# ======================== | |
# | |
# TODO: Set this host's IP | |
HOST_IP=10.0.2.21 | |
MULTI_HOST=1 | |
DEST=/opt/stack | |
# For those unverified Linux releases, e.g. Ubuntu14.10 |
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
echo 52:54:$(dd if=/dev/urandom count=1 2>/dev/null | md5sum | sed 's/^\(..\)\(..\)\(..\)\(..\).*$/\1:\2:\3:\4/') |
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
>>> from datetime import datetime | |
>>> str(datetime.now()) | |
'2011-05-03 17:45:35.177000' |
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
>>> import string | |
>>> import random | |
>>> def id_generator(size=6, chars=string.ascii_uppercase + string.digits): | |
... return ''.join(random.choice(chars) for x in range(size)) | |
... | |
>>> id_generator() | |
'G5G74W' | |
>>> id_generator(3, "6793YUIO") | |
'Y3U' |
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
ADMIN_PASSWORD=<your_password> | |
MYSQL_PASSWORD=<your_password> | |
RABBIT_PASSWORD=<your_password> | |
SERVICE_PASSWORD=<your_password> | |
SERVICE_TOKEN=<your_password> | |
HOST_IP=127.0.0.1 | |
disable_service n-net | |
enable_service q-svc |
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
+xxxxxxxxxx+ | |
x x | |
x x | |
x x | |
x x | |
x x | |
x x |
NewerOlder