Skip to content

Instantly share code, notes, and snippets.

View johnfosborneiii's full-sized avatar

John Osborne johnfosborneiii

View GitHub Profile
#!/usr/bin/env python
# This library requires requests and icalendar
# pip install icalendar
from icalendar import Calendar, Event
from datetime import datetime, timedelta
from pytz import timezone, utc
# Prefix for event summaries
@johnfosborneiii
johnfosborneiii / gnu-makefile-cheat-sheet.md
Created October 16, 2023 11:50
GNU Makefile Convections Cheat Sheet

GNU Makefile Conventions Cheat Sheet (Based on Section 7.2 of GNU Coding Standards)

General Structure

Standard Targets for Users

  • all: Compile the entire program.
  • install: Compile and copy executables, libraries, etc., to their installation directories.
  • install-html, install-dvi, install-pdf, install-ps: Alternative installations for documentation.
  • uninstall: Delete all installed files.
#!/bin/bash
# Check if the script is being run from within a Git repository
if ! git rev-parse --is-inside-work-tree > /dev/null 2>&1; then
echo "Please run this script from within the Git repository you want to analyze."
exit 1
else
# symbolic reference to avoid ambiguous reference errors
git remote set-head origin -a > /dev/null 2>&1
fi

Container Images

Kubernetes

Verify single image

$ cosign verify registry.k8s.io/kube-apiserver-amd64:v1.25.2

Get and Verify All Kubernetes Images

$ version=v1.25.0
curl -Ls https://sbom.k8s.io/v1.25.0/release \
import (
"encoding/json"
"strings"
"list"
"tool/http"
)
#Predicate: {
Data: string
Timestamp: string
...
import (
"encoding/json"
"strings"
"list"
)
#SPDXLicenses: {
licenseListVersion: "3.19"
licenses: [{
reference: "https://spdx.org/licenses/0BSD.html"
isDeprecatedLicenseId: false
import (
"encoding/json"
)
#Predicate: {
Data: string
Timestamp: string
}
#ExternalRefs: {
#!/bin/bash
COSIGN_FILE=$(mktemp -q XXXXXX.json)
printf '\n'
printf '===============================================================\n'
printf '=== Searching artifacthub.io for artifacts signed by cosign ===\n'
printf '===============================================================\n'
printf '\n'