Skip to content

Instantly share code, notes, and snippets.

@planetrobbie
Last active March 17, 2017 14:02
Show Gist options
  • Save planetrobbie/84e4094691a63b6109b1667f93d3b752 to your computer and use it in GitHub Desktop.
Save planetrobbie/84e4094691a63b6109b1667f93d3b752 to your computer and use it in GitHub Desktop.
description
[[snippets]]
description = "mount loki volume"
command = "sshfs [email protected]:/home/sbraun/yet /Users/sbraun/in/luna"
[[snippets]]
description = "Display all listen port"
command = "lsof -Pan -i tcp -i udp"
[[snippets]]
description = "Process with the largest memory usage"
command = "ps aux | sort -nrk +4 | head -n 1"
[[snippets]]
description = "Get my external IP address"
command = "curl ifconfig.co"
[[snippets]]
description = "Serve the current directory"
command = "python -m SimpleHTTPServer 8080"
[[snippets]]
description = "Total size of a sub-directory and all contents"
command = "du -cksh * | sort -hr | head -n 15"
[[snippets]]
description = "which program listen on which port"
command = "netstat -tlnp\\n"
[[snippets]]
description = "Most executed commands"
command = "cat ~/.zsh_history | tr \"\\|\\;\" \"\\n\" | sed -e \"s/^ //g\" | cut -d \" \" -f 1 | sort | uniq -c | sort -n | tail -n 15"
[[snippets]]
description = "sign an ACI image"
command = "gpg --no-default-keyring --armor --secret-keyring /home/sbraun/in/go/src/gpg/rkt.sec --keyring /home/sbraun/in/go/src/gpg/rkt.pub --output ./library-alpine-latest.aci.asc --detach-sig ./library-alpine-latest.aci"
[[snippets]]
description = "publish k8s docs locally"
command = "cd ~/in/k8s/kubernetes.github.io;sudo docker run -ti --rm -v \"$PWD\":/k8sdocs -p 4000:4000 gcr.io/google-samples/k8sdocs:1.0"
[[snippets]]
description = "k8s/get kube-system pods"
command = "kubectl get po -n kube-system -o wide"
[[snippets]]
description = "k8s/logs kube-system pods"
command = "kubectl logs -n kube-system"
[[snippets]]
description = "k8s/exec cmd in a pod"
command = "kubectl exec POD CMD -n kube-system"
[[snippets]]
description = "k8s/nodes info"
command = "kubectl get nodes -oyaml"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment