Skip to content

Instantly share code, notes, and snippets.

View karlmutch's full-sized avatar
🇳🇿
( ಠ ͜ʖಠ)

Karl Mutch karlmutch

🇳🇿
( ಠ ͜ʖಠ)
View GitHub Profile
@karlmutch
karlmutch / kubedump.sh
Created April 16, 2019 23:03 — forked from negz/kubedump.sh
Dump Kubernetes cluster resources as YAML
#!/usr/bin/env bash
set -e
CONTEXT="$1"
if [[ -z ${CONTEXT} ]]; then
echo "Usage: $0 KUBE-CONTEXT"
exit 1
fi
@karlmutch
karlmutch / minikube_ubuntu_installation.md
Created April 11, 2019 17:26 — forked from gonzaloplaza/minikube_ubuntu_installation.md
Minikube installation on Ubuntu 16.04 LTS

Minikube Installation on Ubuntu 16.04 LTS

Overview:

  1. Install hypervisor (Virtualbox)
  2. Get and install Kubectl (repositories)
  3. Get and install Minikube last version
  4. Start and Test Minikube local cluster and expose demo service

Install VirtualBox hypervisor

@karlmutch
karlmutch / kops-1.11-aws.md
Created April 9, 2019 00:06 — forked from diegopacheco/kops-1.11-aws.md
Kops 1.11 on AWS

Local Linux

Install AWS cli

pip install awscli --upgrade --user

Install Kubectl

curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.13.0/bin/darwin/amd64/kubectl
chmod +x ./kubectl
@karlmutch
karlmutch / kubectl.md
Created February 1, 2019 19:13 — forked from so0k/kubectl.md
Playing with kubectl output

Kubectl output options

Let's look at some basic kubectl output options.

Our intention is to list nodes (with their AWS InstanceId) and Pods (sorted by node).

We can start with:

kubectl get no
package main
import (
"go/ast"
"go/parser"
"go/token"
"go/format"
"os"
"reflect"
sudo vi /etc/sysctl.conf
# Add the following to sysctl.conf:
# Decrease TIME_WAIT seconds
net.ipv4.tcp_fin_timeout = 30
# Recycle and Reuse TIME_WAIT sockets faster
net.ipv4.tcp_tw_recycle = 1
// Found at https://play.golang.org/p/pQn_doizkn_L
package main
import (
"fmt"
"reflect"
)
var strs = make(map[reflect.Type]map[int]string)
@karlmutch
karlmutch / cgo.md
Created August 16, 2018 18:04 — forked from zchee/cgo.md
cgo convert list

See also, http://libraryofalexandria.io/cgo/

Using Go cgo

cgo has a lot of trap.
but Not "C" pkg also directory in $GOROOT/src. IDE's(vim) Goto command not works.

So, Here collect materials.

@karlmutch
karlmutch / Install NVIDIA Driver and CUDA.md
Created August 16, 2018 01:12 — forked from zhanwenchen/Install NVIDIA Driver and CUDA.md
Install NVIDIA CUDA 9.0 on Ubuntu 16.04.4 LTS
@karlmutch
karlmutch / ansible-bootstrap-ubuntu-16.04.yml
Created August 13, 2018 16:16 — forked from gwillem/ansible-bootstrap-ubuntu-16.04.yml
Get Ansible to work on bare Ubuntu 16.04 without python 2.7
# Add this snippet to the top of your playbook.
# It will install python2 if missing (but checks first so no expensive repeated apt updates)
# [email protected]
- hosts: all
gather_facts: False
tasks:
- name: install python 2
raw: test -e /usr/bin/python || (apt -y update && apt install -y python-minimal)