Skip to content

Instantly share code, notes, and snippets.

@dmikusa
dmikusa / get_sbom_layer.sh
Created February 17, 2022 04:03
A script that uses `curl` to download the SBOM layer of an OCI image created with Cloud-Native buildpacks
#!/bin/bash
set -eio pipefail
IMAGE="$1"
TAG="$2"
TOKEN=$(curl -s "https://auth.docker.io/token?scope=repository:$IMAGE:pull&service=registry.docker.io" | jq -r .token)
MANIFEST=$(curl -s -L -H "Accept: application/vnd.docker.distribution.manifest.v2+json" -H "Authorization: Bearer $TOKEN" https://registry-1.docker.io/v2/$IMAGE/manifests/$TAG)

Programming Challenges

  • Pick something and implement it
  • The topics are open-ended
  • Pairing is suggested
  • Want to try some new tech, this is a great time
  • You may use any tools that you like, including code generators and AI, but make sure you can roughly explain what your code is going at the end
  • Towards the end, we'll ask people to show off their work. A demo or quick code walk through. Nothing crazy, just a couple minutes.
  • You must decide what you implement. Consider time, what you can deliver, what you can reasonably demo, and wow factor.
@dmikusa
dmikusa / main.go
Created March 18, 2024 03:42
Update a buildpack.toml file. For automating changes across many buildpacks.
package main
import (
"bytes"
"fmt"
"os"
"path/filepath"
"strings"
"github.com/BurntSushi/toml"