This guide has moved to a GitHub repository to enable collaboration and community input via pull-requests.
https://github.com/alexellis/k8s-on-raspbian
Alex
| kind: Ingress | |
| apiVersion: extensions/v1beta1 | |
| metadata: | |
| name: redirect-ingress | |
| annotations: | |
| ingress.kubernetes.io/configuration-snippet: | | |
| if ($host ~ ^(.+)\.somedomain\.io$) { | |
| return 301 https://$1.domain.io$request_uri; | |
| } | |
| spec: |
This guide has moved to a GitHub repository to enable collaboration and community input via pull-requests.
https://github.com/alexellis/k8s-on-raspbian
Alex
| alias kc='kubectl' | |
| alias kclf='kubectl logs --tail=200 -f' | |
| alias kcgs='kubectl get service -o wide' | |
| alias kcgd='kubectl get deployment -o wide' | |
| alias kcgp='kubectl get pod -o wide' | |
| alias kcgn='kubectl get node -o wide' | |
| alias kcdp='kubectl describe pod' | |
| alias kcds='kubectl describe service' | |
| alias kcdd='kubectl describe deployment' | |
| alias kcdf='kubectl delete -f' |
Table of Contents
| #!/usr/bin/env ruby | |
| require 'octokit' | |
| # !!! DO NOT EVER USE HARD-CODED VALUES IN A REAL APP !!! | |
| login = ENV['GH_LOGIN'] | |
| password = ENV['GH_LOGIN_PASSWORD'] | |
| repo = "gjtorikian/crud-test" | |
| master = client.ref(repo, "heads/master") | |
| # Given a controller that looks like this | |
| class ModelsController < ApplicationController | |
| load_and_authorize_resource #CanCan | |
| def show | |
| if stale? @model | |
| respond_to do |format| | |
| format.json do | |
| @model | |
| end |
| require "openssl" | |
| require "digest" | |
| def aes128_encrypt(key, data) | |
| key = Digest::MD5.digest(key) if(key.kind_of?(String) && 16 != key.bytesize) | |
| aes = OpenSSL::Cipher.new('AES-128-CBC') | |
| aes.encrypt | |
| aes.key = key | |
| aes.update(data) + aes.final | |
| end |
| –ctrl a c -> create new window | |
| –ctrl a A -> set window name | |
| –ctrl a w -> show all window | |
| –ctrl a 1|2|3|… -> switch to window n | |
| –ctrl a ” -> choose window | |
| –ctrl a ctrl a -> switch between window | |
| –ctrl a d -> detach window | |
| –ctrl a ? -> help | |
| –ctrl a [ -> start copy, move cursor to the copy location, press ENTER, select the chars, press ENTER to copy the selected characters to the buffer | |
| –ctrl a ] -> paste from buffer |