Skip to content

Instantly share code, notes, and snippets.

:octocat:
writing code!

Shane Utt shaneutt

:octocat:
writing code!
View GitHub Profile
View gist:69f9131b660422ce747dc884d253c764
#!/bin/bash
set -euo pipefail
kubectl -n kube-system create serviceaccount tiller
kubectl create clusterrolebinding tiller --clusterrole=cluster-admin --serviceaccount=kube-system:tiller
helm init --service-account tiller
kubectl apply -f https://raw.githubusercontent.com/rancher/local-path-provisioner/master/deploy/local-path-storage.yaml
kubectl delete storageclasses.storage.k8s.io standard
kubectl patch storageclass local-path -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}'
@shaneutt
shaneutt / ca_and_cert_golang_demo.go
Created Jan 19, 2019
Golang: Demonstrate creating a CA Certificate, and Creating and Signing Certs with the CA
View ca_and_cert_golang_demo.go
package main
import (
"bytes"
"crypto/rand"
"crypto/rsa"
"crypto/tls"
"crypto/x509"
"crypto/x509/pkix"
"encoding/pem"
@shaneutt
shaneutt / web-servers.md
Created Nov 30, 2017 — forked from willurd/web-servers.md
Big list of http static server one-liners
View web-servers.md

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@shaneutt
shaneutt / connect.rs
Created Oct 25, 2016 — forked from mathieulegrand/connect.rs
simple connect to server:443 in Rust
View connect.rs
// Rust 0.10-pre (Tue Mar 18, 2014)
// $ rustc -L rust-openssl/build/ -L rust-toml/lib doing.rs
// assuming https://github.com/sfackler/rust-openssl is cloned and compiled,
// and https://github.com/mneumann/rust-tom is cloned and compiled
#[feature(macro_rules)];
#[allow(deprecated_owned_vector)];
extern crate openssl;
extern crate serialize;
@shaneutt
shaneutt / tmux.md
Created Apr 30, 2016 — forked from andreyvit/tmux.md
tmux cheatsheet
View tmux.md

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

# remap prefix to Control + a
You can’t perform that action at this time.