slingshot cluster create \
-f - \
-I jetstack/slingshot-ip-terraform-aws-coreos:0.1 \
-C jetstack/slingshot-cp-ansible-k8s-coreos:flocker-0.1 \
christian-flocker <<EOF
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
| kubectl get rs,secrets -o json --namespace old | jq '.items[].metadata.namespace = "new"' | kubectl create-f - |
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
| # Flocker go library examples | |
| package main | |
| import ( | |
| "encoding/json" | |
| flockerApi "github.com/simonswine/flocker-go" | |
| "log" | |
| ) |
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
| --- | |
| kind: Service | |
| apiVersion: v1 | |
| metadata: | |
| name: hello-world-hpa | |
| labels: | |
| app: hello-world | |
| spec: | |
| type: NodePort | |
| ports: |
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
| " Disable compatability | |
| set nocompatible | |
| filetype off | |
| set rtp+=~/.vim/bundle/vundle/ | |
| call vundle#rc() | |
| " Let Vundle manage Vundle | |
| Plugin 'gmarik/vundle' |
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 main | |
| import ( | |
| log "github.com/Sirupsen/logrus" | |
| "sync" | |
| "time" | |
| ) | |
| // work short is done right away | |
| func workShort(id string) { |
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
| class StringCalc | |
| def self.calc(str) | |
| # default regex to split | |
| re_split = %r{[\n,]} | |
| # regex for custom delimiter | |
| m = str.match(%r{^//(.)}) | |
| re_split = %r{#{m[1]}} if m | |
| # sum initial val |
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
| mysql -e "SELECT concat('DROP TABLE IF EXISTS ', table_name, ';') FROM information_schema.tables WHERE table_schema = 'xx';" | tail -n +2 | mysql xx |
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
| require 'date' | |
| require 'net/imap' | |
| dictionary = { | |
| 'a' => 'Junk', | |
| 'b' => 'NonJunk', | |
| 'c' => '$label5', | |
| 'd' => '$label2', | |
| 'e' => '$label3', | |
| 'f' => '$label1', |
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
| cat /var/log/mail.info | grep relay=gmail | ruby -ne 'm=/^(\S+\s+\S+\s+\S+).*(relay=[^, ]+).*status=(\S+)(.*)$/.match($_); printf "%s %-8s %-60s %s\n", m[1], m[3], m[2], m[4]' |