Skip to content

Instantly share code, notes, and snippets.

Parental leave

Jason Hall ImJasonH

Parental leave
Block or report user

Report or block ImJasonH

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View main.go
package main
import "fmt"
func main() {
fmt.Println("goodbye cruel world")
View gist:c2585fa0ce74fbb4ad22e53ba9bf0c84
$ ko publish
2019/02/01 11:17:40 Using base for
2019/02/01 11:17:41 Publishing
2019/02/01 11:17:42 existing blob: sha256:4003b5b92ca98a8926d9112839f3f17e69f4ec4f995abb188a3ce3ccf93cd6d9
2019/02/01 11:17:42 existing blob: sha256:8ff7789f00584c4605cff901525c8acd878ee103d32351ece7d7c8e5eac5d8b4
2019/02/01 11:17:42 existing blob: sha256:bb2297ebc4b391f2fd41c48df5731cdd4dc542f6eb6113436b81c886b139a048
2019/02/01 11:17:44 pushed blob sha256:24edc85499204884bb749902cbef736c1e53621c534c69fbb80850d55b970ac5
2019/02/01 11:17:45 pushed blob sha256:8ec83c2afff1e8595d45bd906ae839f7d7b525fd4c1442a4705747755b2a5fd6
2019/02/01 11:17:48 digest: sha256:121f9c7a23a6435a66a4a27be64a1b9287550b68cc8e52564de81b8f9ff3c187 size: 914
2019/02/01 11:17:48 Published
View cloudbuild.yaml
- name:
args: ['version']
- name:
args: ['pull', 'r2d4/mocker:latest']
- name:
args: ['pull', 'ubuntu:16.04']
- name:
View main.go
package main
import "fmt"
func main() { fmt.Println("hi again") }
while read l; do
echo Removing $l
docker image rm $l
done < images.txt
View Dockerfile
FROM golang:latest
RUN mkdir /app
ADD . /app/
RUN go build -o helloworld .
CMD ["/app/helloworld"]
ImJasonH / pod.yaml
Last active Jun 28, 2018
Repro pod that fails to start since init container isn't found
View pod.yaml
Warning FailedMount 1m (x8 over 2m) kubelet, gke-cluster-1-default-pool-f1d9d3b1-x598 MountVolume.SetUp failed for volume "podinfo-init" : container init not found
Warning FailedMount 3s kubelet, gke-cluster-1-default-pool-f1d9d3b1-x598 Unable to mount volumes for pod "pod_default(bdca098f-7b0a-11e8-b5dd-42010a8e007f)": timeout expired waiting for volumes to attach or mount for pod "default"/"pod". list of unmounted volumes=[podinfo-init]. list of unattached volumes=[podinfo-init podinfo-real default-token-pkttv]
ImJasonH / example
Created Jun 7, 2018
Demonstrate connecting to GKE cluster from outside, starting pod, grabbing logs
View example
$ go run main.go -tok=$(gcloud auth print-access-token) -project=$(gcloud config get-value core/project)
There are 41 pods in the cluster
There are 3 nodes in the cluster
-> gke-cluster-1-default-pool-968a07e0-bw9p
-> gke-cluster-1-default-pool-968a07e0-gxzx
-> gke-cluster-1-default-pool-968a07e0-xrdh
Created pod foo-k4twr
container "noop" in pod "foo-k4twr" is waiting to start: ContainerCreating
container "noop" in pod "foo-k4twr" is waiting to start: ContainerCreating
View Dockerfile
FROM ubuntu
RUN apt-get update && apt-get -y install python3
ImJasonH / main.go
Last active Mar 29, 2018
Text-to-Speech-to-Text-to-Speech ad infinitum
View main.go
package main
import (
You can’t perform that action at this time.