Skip to content

Instantly share code, notes, and snippets.

View yunghoy's full-sized avatar

Youngho Lee yunghoy

  • Vancouver, Canada
View GitHub Profile
https://github.com/kubernetes/dashboard
$ kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/master/src/deploy/recommended/kubernetes-dashboard.yaml
$ kubectl -n kube-system describe secrets `kubectl -n kube-system get secrets | awk '/clusterrole-aggregation-controller/ {print $1}'` | awk '/token:/ {print $2}'
$ kubectl proxy
$ kubectl get svc -n kube-system
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
kube-dns ClusterIP 10.96.0.10 <none> 53/UDP,53/TCP 39m
kubernetes-dashboard ClusterIP xxx.xxx.xxx.xxxx <none> 443/TCP 31m
curl http://169.254.169.254/latest/meta-data/public-ipv4
curl checkip.amazonaws.com
dig -x $(curl -s checkip.amazonaws.com) +short
COMMAND='echo hello'
if [ ! -z "$1" ]; then
COMMAND=$1
fi
parallel-ssh -i -h host.list -l ubuntu -x "-oStrictHostKeyChecking=no -i aws.key" $COMMAND
docker service create --name redis --endpoint-mode dnsrr --hostname redis{{.Task.Slot}} --replicas 2 redis
Ubuntu 14.04
/etc/fstab -> tmpfs /tmp tmpfs defaults,noatime,nosuid,nodev,noexec,mode=1777,size=512M 0 0
Ubuntu 16.04
sudo cp /usr/share/systemd/tmp.mount /etc/systemd/system/tmp.mount
sudo systemctl enable tmp.mount
sudo systemctl start tmp.mount
@yunghoy
yunghoy / gist:ba416646c713c7944b627915b1c0291e
Created August 19, 2017 15:52
Nvidia Driver for Ubuntu
https://help.ubuntu.com/community/BinaryDriverHowto/Nvidia
http://blog.haproxy.com/2012/10/29/haproxy-log-customization/
https://goaccess.io/man#custom-log
Default log format
TCP log format
1
// haproxy
global
log /dev/log local0
listen http
log /dev/log local0
mode http
capture request header Referer len 128
capture request header User-Agent len 128
log-format |%si:%sp|%ci:%cp|%t|%ID|%s|%ST|%B|%Tt|\"%r\"|\"%hr\"|
// haproxy
global
log /dev/log local0
listen http
log /dev/log local0
mode http
capture request header Referer len 128
capture request header User-Agent len 128
log-format |%si:%sp|%ci:%cp|%t|%ID|%s|%ST|%B|\"%r\"|\"%hr\"|
user nobody nogroup;
worker_processes auto; # auto-detect number of logical CPU cores
events {
worker_connections 1024; # set the max number of simultaneous connections (per worker process)
}
http {
##