- 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.
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: v1 | |
kind: ServiceAccount | |
metadata: | |
name: tiller | |
namespace: kube-system | |
--- | |
apiVersion: rbac.authorization.k8s.io/v1beta1 | |
kind: ClusterRoleBinding | |
metadata: | |
name: tiller |
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
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 |
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 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 |
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
kind: Pod | |
apiVersion: v1 | |
metadata: | |
name: alpine | |
labels: | |
app: debug-alpine | |
spec: | |
containers: | |
- image: alpine | |
command: ["sh","-c","tail -f /dev/null"] |
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 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") |
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
let Peer = require('simple-peer') | |
const serverURL = 'http://localhost:9080/chat/' | |
export default { | |
name: 'test', | |
data () { | |
return { | |
peer: null, | |
initiatorID: null, |
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
swagger: "2.0" | |
info: | |
version: 1.0.0 | |
title: Swagger Petstore | |
license: | |
name: MIT | |
host: petstore.swagger.io | |
basePath: /v1 | |
schemes: | |
- http |
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
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: |
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
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); |