Skip to content

Instantly share code, notes, and snippets.

View euank's full-sized avatar

Euan Kemp euank

View GitHub Profile
==> WARNING: Using smartmontools or hdparm with this
drive may result in data loss due to a firmware bug.
****** THIS DRIVE MAY OR MAY NOT BE AFFECTED! ******
Buggy and fixed firmware report same version number!
@euank
euank / in.py
Created January 5, 2017 02:33
grumpy.png
print "Hello world"
if None is None:
print "NaN"
==> ingress.yaml <==
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: wobscale-matrix
annotations:
stable.k8s.psg.io/kcm.enabled: "true"
stable.k8s.psg.io/kcm.provider: "cloudflare"
stable.k8s.psg.io/kcm.email: "admin@wobscale.website"
$ sudo rkt version
rkt Version: 1.20.0
appc Version: 0.8.9
Go Version: go1.7.3
Go OS/Arch: linux/amd64
Features: -TPM +SDJOURNAL
# If I run a non-interactive rkt pod which remounts sys rw, I can't write to hashsize
$ cat file.sh
#!/bin/bash
set -e
function command_not_found_handle {
echo "Command not found: $1"
exit 1
}
@euank
euank / k8s-deps.sh
Last active November 28, 2016 05:41
Unique dependencies in Kubernetes' Godeps.json
esk@Enkidudu kubernetes (master) $ git rev-parse HEAD
545f749a0deb8535656ce93ac1f35a59887839bf # up to date as of Sun Nov 27 21:40:19 PST 2016
esk@Enkidudu kubernetes (master) $ count-godep-deps.sh # from https://github.com/euank/kitchen-sink/blob/master/snippets/godeps-dependency-count/count-godep-deps.sh
There are 152 dependencies. The shortest package from each is listed below:
bitbucket.org/bertimus9/systemstat
bitbucket.org/ww/goautoneg
cloud.google.com/go/internal
github.com/Azure/azure-sdk-for-go/storage
github.com/Azure/go-ansiterm
github.com/Azure/go-autorest/autorest
@euank
euank / 1.rs
Last active November 28, 2016 00:53
#[macro_use] extern crate nickel;
use nickel::{Nickel, HttpRouter};
use std::collections::HashMap;
fn main() {
let mut server = Nickel::new();
// * NOTE *
// This example is deprecated, you should use nickel_mustache from crates.io
@euank
euank / example.sh
Last active November 25, 2016 17:10
How I run CRI rktlet remote during development
terminal-1 rktlet-repo $ make
terminal-1 rktlet-repo $ sudo ./bin/rktlet -logtostderr -v=10
------
terminal-2 k8s-repo $ cat env.rktlet
export ENABLE_NODE_LOGGING=false
export ENABLE_CLUSTER_MONITORING=none
export KUBELET_HOST=0.0.0.0
apiVersion: v1
kind: Pod
metadata:
labels:
name: example-init
name: example-init
annotations:
pod.alpha.kubernetes.io/init-containers: '[
{
"name": "initone",
apiVersion: v1
kind: Pod
metadata:
labels:
name: example-init
name: example-init
annotations:
pod.alpha.kubernetes.io/init-containers: '[
{
"name": "initone",