Skip to content

Instantly share code, notes, and snippets.


Michael McCune elmiko

View GitHub Profile
elmiko / kubectl-riffs.cheat
Last active Apr 28, 2020
kubernetes command line incantations
View kubectl-riffs.cheat
% kubectl
# get all pods in cluster and show what node they are deployed on
kubectl get pods -o=jsonpath='{range .items[*]}{}{"\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>")]}{}{"\t"}{.metadata.namespace}{"\n"}' --all-namespaces
# get all machines and show their associated node
kubectl get machines -o=jsonpath='{range .items[*]}{}{"\t"}{}{"\n"}'
elmiko / oshinko-python36-spark-build-dc.yaml
Created May 18, 2018
oshinko python36 experimental s2i builder template
View oshinko-python36-spark-build-dc.yaml
apiVersion: v1
kind: Template
application: oshinko-python-spark
createdBy: template-oshinko-python36-spark-build-dc
description: Create a buildconfig, imagestream and deploymentconfig using source-to-image and Python Spark source files hosted in git Apache Spark Python
name: oshinko-python36-spark-build-dc
elmiko / https.go
Created Jan 7, 2018 — forked from kennwhite/https.go
Simple https http/2 static web server with HSTS & CSP (A+ SSLLabs & rating) in Go using LetsEncrypt acme autocert
View https.go
package main
import (
elmiko / main.go
Created Jan 7, 2018 — forked from enricofoltran/main.go
A simple golang web server with basic logging, tracing, health check, graceful shutdown and zero dependencies
View main.go
package main
import (
View gist:0d11d4170a734bf6a70053fd2c0a14b2
git clone
docker run -it -p 8888:8888 -p 6006:6006 -v tutorials:/root/sharedfolder floydhub/dl-docker:cpu jupyter notebook
elmiko / gist:0086b3f59634a2993d6e95988d6b97ed
Last active Aug 24, 2016 — forked from pweil-/gist:0cb9f196bde594b96f84
scripts for doing some rebase work with openshift
View gist:0086b3f59634a2993d6e95988d6b97ed
[pweil@localhost codebase]$ ./
+ 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
imports no buildable Go source files in /home/pweil/codebase/rebase/src/
elmiko /
Created Feb 28, 2013
I liked the ideas put forward by the 1.5.0 version of CoffeeScript for using Markdown documents as both source file and documentation. Here is a quick and dirty Python file to do the same type of preprocessing for any language.
#!/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()