lsof -iTCP -sTCP:LISTEN -n -P# utility function
listening() {
    if [ $# -eq 0 ]; then
        sudo lsof -iTCP -sTCP:LISTEN -n -P
 elif [ $# -eq 1 ]; thenlsof -iTCP -sTCP:LISTEN -n -P# utility function
listening() {
    if [ $# -eq 0 ]; then
        sudo lsof -iTCP -sTCP:LISTEN -n -P
 elif [ $# -eq 1 ]; thenhttps://rancher.com/docs/k3s/latest/en/installation/kube-dashboard/
Deploying the Kubernetes Dashboard
GITHUB_URL=https://github.com/kubernetes/dashboard/releases
VERSION_KUBE_DASHBOARD=$(curl -w '%{url_effective}' -I -L -s -S ${GITHUB_URL}/latest -o /dev/null | sed -e 's|.*/||')
kubectl create -f https://raw.githubusercontent.com/kubernetes/dashboard/${VERSION_KUBE_DASHBOARD}/aio/deploy/recommended.yaml#ref https://github.com/rancher/k3d/blob/master/docs/examples.md
In this example, we will deploy a simple nginx webserver deployment and make it accessible via ingress.
k3d create --publish 8080:8080 --name testcls1 --workers 3
https://felixwiedmann.de/k3d-manage-k3s-clusters/
---| # Possibly obsolete: k3d create --name testcls1 --workers 3 | |
| k3d create --name testcls1 --workers 3 --server-arg "--no-deploy=traefik" --server-arg "--no-deploy=servicelb" | |
| # UPDATE: in newer versions onwards, this has evolved to (thanks to comments below): | |
| k3d cluster create --k3s-arg "--no-deploy=traefik@server:*" | 
| # On OS X | |
| $ vi ~/.bash_profile | |
| # Add following for running spark, pyspark, jupyter | |
| #----- | |
| # FOR SPARK | |
| #----- | |
| # | |
| # for PYSPARK | 
| brew install numpy | |
| brew install scipy | |
| brew install matplotlib | |
| --- | |
| *VirtualEnv* | |
| $ mkvirtualenv ml | |
| $ cd .virtualenvs/ml/ | |
| $ ln -s /usr/local/lib/python2.7/site-packages/{numpy,scipy}* lib/python2.7/site-packages/ | |
| $ workon ml | |
| (ml) $ pip freeze | grep -i numpy | 
| slappasswd -h {SSHA} -s password | 
| echo `date "+%Y-%m-%d-%H-%M-%S"` | |
| # outptut - 2017-05-22-14-38-18 | 
| # from https://www.digitalocean.com/community/tutorials/how-to-install-nginx-on-centos-7 | |
| sudo yum install epel-release | |
| sudo yum update | |
| sudo yum install nginx | |
| # start nginx | |
| sudo systemctl start nginx | |
| # If you are running a firewall, run the following commands to allow HTTP and HTTPS traffic: |