This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% kubectl | |
# get all pods in cluster and show what node they are deployed on | |
kubectl get pods -o=jsonpath='{range .items[*]}{.metadata.name}{"\t"}{.spec.nodeName}{"\n"}' --all-namespaces | |
# get all pods on a node and show what namespace they are in | |
kubectl get pods -o=jsonpath='{range .items[?(@.spec.nodeName=="<Node ID>")]}{.metadata.name}{"\t"}{.metadata.namespace}{"\n"}' --all-namespaces | |
# get all machines and show their associated node | |
kubectl get machines -o=jsonpath='{range .items[*]}{.metadata.name}{"\t"}{.status.nodeRef.name}{"\n"}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Template | |
labels: | |
application: oshinko-python-spark | |
createdBy: template-oshinko-python36-spark-build-dc | |
metadata: | |
annotations: | |
description: Create a buildconfig, imagestream and deploymentconfig using source-to-image and Python Spark source files hosted in git | |
openshift.io/display-name: Apache Spark Python | |
name: oshinko-python36-spark-build-dc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"crypto/tls" | |
"golang.org/x/crypto/acme/autocert" | |
"log" | |
"net" | |
"net/http" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"context" | |
"flag" | |
"fmt" | |
"log" | |
"net/http" | |
"os" | |
"os/signal" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git clone https://github.com/torch/tutorials.git | |
docker run -it -p 8888:8888 -p 6006:6006 -v tutorials:/root/sharedfolder floydhub/dl-docker:cpu jupyter notebook |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[pweil@localhost codebase]$ ./restore.sh | |
+ export GOPATH=/home/pweil/codebase/rebase | |
+ GOPATH=/home/pweil/codebase/rebase | |
+ rm -rf /home/pweil/codebase/rebase | |
+ mkdir -p /home/pweil/codebase/rebase | |
+ cd /home/pweil/codebase/rebase | |
+ go get github.com/kubernetes/kubernetes | |
package github.com/kubernetes/kubernetes | |
imports github.com/kubernetes/kubernetes | |
imports github.com/kubernetes/kubernetes: no buildable Go source files in /home/pweil/codebase/rebase/src/github.com/kubernetes/kubernetes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import argparse | |
import markdown | |
import os.path | |
from bs4 import BeautifulSoup | |
def read_code_from_file(mdfile): | |
"""returns a string of the code sections in the Markdown file""" | |
origfilepos = mdfile.tell() |