Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Jason Hall imjasonh

🏠
Working from home
View GitHub Profile
View windows_test.go
// +build e2e,windows_e2e
/*
Copyright 2021 The Tekton Authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
View test.md
@imjasonh
imjasonh / usps.go
Last active Jul 30, 2021
Go script to ping the USPS package tracking API
View usps.go
package main
import (
"encoding/xml"
"flag"
"fmt"
"io/ioutil"
"log"
"net/http"
"net/url"
@imjasonh
imjasonh / markdown.css
Last active Jun 10, 2021
Render Markdown as unrendered Markdown (see http://jsbin.com/huwosomawo)
View markdown.css
* {
font-size: 12pt;
font-family: monospace;
font-weight: normal;
font-style: normal;
text-decoration: none;
color: black;
cursor: default;
}
View main.go
package main
import (
"encoding/json"
"fmt"
"log"
"os"
"github.com/google/go-containerregistry/pkg/authn"
"github.com/google/go-containerregistry/pkg/name"
@imjasonh
imjasonh / test.sh
Last active Apr 16, 2021
crane append + mutate
View test.sh
docker run --rm $(
go run ./cmd/crane mutate $(
go run ./cmd/crane/ append -b busybox -f <(tar -f - -c hello.sh) -t gcr.io/kontaindotme/appended \
) --entrypoint=/hello.sh --new_ref=gcr.io/kontaindotme/mutated \
)
2021/04/16 10:44:33 No matching credentials were found for "index.docker.io/library/busybox", falling back on anonymous
2021/04/16 10:44:35 existing blob: sha256:f531cdc67389c92deac44e019e7a1b6fba90d1aaa58ae3e8192f0e0eed747152
2021/04/16 10:44:37 pushed blob: sha256:078105f9432ce9585d7f6b76a2bd0aed14b1bae9dec29ed679a6b5576cb89664
2021/04/16 10:44:37 existing blob: sha256:d6a3237b5852e9da63a291612928da68d814897550b15e9e0ca77934a8672792
2021/04/16 10:44:38 gcr.io/kontaindotme/appended: digest: sha256:a58979bf3493cbc9acea0541190c5621853bc57b4683970d847ba23ab3b660e4 size: 586
View main.go
package main
import (
"flag"
"fmt"
"log"
"strings"
"github.com/google/go-containerregistry/pkg/authn"
"github.com/google/go-containerregistry/pkg/name"
View README.md

release-note aggregator

  • identifies PRs merged since the last release with kind and release notes, separates by kind, prints Markdown to stdout
  • written in Go instead of Bash
  • makes as few GitHub API requests as possible, to avoid rate limits
    • when it does hit rate limiting, it'll wait for quota and retry

Usage and example output

@imjasonh
imjasonh / .gitignore
Last active Apr 2, 2021
Demo: Shipwright using cosign to sign container images it builds
View .gitignore
secret.yaml
View gist:2a8ca3bc2f4be055af99ac9936de5346
$ cat cfg1.json cfg2.json
{
"auths": {
"registry.a": {
"auth": "base64junk-a"
},
"registry.b": {
"auth": "base64junk-b"
}
}