Skip to content

Instantly share code, notes, and snippets.

apiVersion: v1
kind: ServiceAccount
metadata:
name: tiller
namespace: kube-system
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
name: tiller
clustername=$1
rgname=$2
ipname=$3
getclusterrg="az resource show --resource-group $rgname --name $clustername --resource-type Microsoft.ContainerService/managedClusters --query properties.nodeResourceGroup -o tsv"
az network public-ip create -g $($getclusterrg) --name $ipname --allocation-method static
FROM golang:1.10.3 AS build
WORKDIR /go/src/github.com/awesomename/foo
RUN go get github.com/golang/dep/cmd/dep
COPY Gopkg.toml Gopkg.lock ./
RUN dep ensure -v -vendor-only
COPY foo foo
RUN CGO_ENABLED=0 GOOS=linux go build -o /go/bin/foo -ldflags="-w -s" -v github.com/awesomename/foo
kind: Pod
apiVersion: v1
metadata:
name: alpine
labels:
app: debug-alpine
spec:
containers:
- image: alpine
command: ["sh","-c","tail -f /dev/null"]
package solution
// you can also use imports, for example:
// import "fmt"
// import "os"
// you can write to stdout for debugging purposes, e.g.
// fmt.Println("this is a debug message")
let Peer = require('simple-peer')
const serverURL = 'http://localhost:9080/chat/'
export default {
name: 'test',
data () {
return {
peer: null,
initiatorID: null,
@scriptonist
scriptonist / petstore.yaml
Created February 26, 2018 06:20
Petstore YAML swagger
swagger: "2.0"
info:
version: 1.0.0
title: Swagger Petstore
license:
name: MIT
host: petstore.swagger.io
basePath: /v1
schemes:
- http
swagger: "2.0"
info:
description: From the todo list tutorial on goswagger.io
title: A Todo list application
version: 1.0.0
consumes:
- application/io.goswagger.examples.todo-list.v1+json
produces:
- application/io.goswagger.examples.todo-list.v1+json
schemes:
  • Traditional SQL databases are built from ground up to run on single machine.
  • Inorder to scale them you can only do verticals, ie if you wanna add more power you buy a more powerfull system.
if (obj.photo){
// console.log(obj);
caches.open(contentImgsCache).then(function(cache){
cache.keys().then(function(requests){
requests.forEach(function(request){
// console.log(obj);
if (obj.photo.split('/').pop() != request.url.split('/').pop()){
cache.delete(request).then(function(result){
if (result === false)
console.log("error deleting : "+request.url);