Skip to content

Instantly share code, notes, and snippets.

Working from home

Jason Hall imjasonh

Working from home
View GitHub Profile
View go-containerregistry
$ cat pkg/**/*.go | sort | uniq -c | sort -n | tail -n 20
195 if err != nil {
201 import (
225 )
226 //
226 // Licensed under the Apache License, Version 2.0 (the "License");
226 // See the License for the specific language governing permissions and
226 // Unless required by applicable law or agreed to in writing, software
226 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
226 // You may obtain a copy of the License at

GCPing is a simple single-page website where you can find out the relative latency between your browser and multiple GCP regions. GCP manages data centers around the world, but which one is closest to you, or more importantly, your customers? GCPing can answer that.

GCPing is a 20% project, and for the four years since its inception it was backed by small f1-micro GCE VMs in each region, with a public IP address, and a static HTML and JavaScript frontend served from GCS.

Over time, new regions would come online, or basic maintenance and upgrades

imjasonh / tarfs.go
Created Jan 13, 2021
Trying to plug a tar.Reader into fs.FS
View tarfs.go
package main
import (
imjasonh /
Last active Nov 22, 2020
Terraform config for GCPing


Prerequisites: Install Terraform and ko

$ terraform init
$ terraform apply -var image=$( ko publish ./cmd/ping/)
imjasonh / multi_write.go
Created Nov 2, 2020
remote.MultiWrite demo
View multi_write.go
package main
import (
imjasonh / gcr-creds.yaml
Created Oct 2, 2020
GCR creds-updating Tekton sidecar
View gcr-creds.yaml
# Demonstrates a GCR creds-updating sidecar
# - The `creds-refresh` sidecar periodically fetches a Service Account auth
# token and uses it with `docker login` to authorize docker pushes to GCR.
# - The dind sidecar provides an ephemeral Docker daemon to run builds and
# store images before they're pushed.
# - The step periodically uses these credentials to push an image to GCR.
# $ kubectl create -f gcr-creds.yaml
# created

Testing GCE VM suspend/resume latency

time ./  &> output.txt


  • COS VM create takes ~10s
  • VM delete takes ~2m20s
imjasonh /
Last active Jul 13, 2020
Custom Tasks TODOs
imjasonh /
Created Jun 24, 2020
Cloud Build custom task for Tekton

Google Cloud Build for Tekton


Install and configure ko.

ko apply -f cmd/cloudbuild/