Skip to content

Instantly share code, notes, and snippets.

View BobyMCbobs's full-sized avatar
🎷
sax for your soul

Caleb Woodbine BobyMCbobs

🎷
sax for your soul
View GitHub Profile
@BobyMCbobs
BobyMCbobs / chainsaw-knative-helloworld-test.yaml
Last active February 20, 2024 01:49
chainsaw-knative-helloworld-test
# Based off of
# https://github.com/knative/serving/blob/main/test/e2e/helloworld_test.go
# TODO
# - request URL and verify response
---
apiVersion: chainsaw.kyverno.io/v1alpha1
kind: Test
metadata:
@BobyMCbobs
BobyMCbobs / chainsaw-knative-securedefaults-attempt.yaml
Last active February 16, 2024 01:55
Chainsaw test attempt for Knative with test Secure Defaults
# Based off of
# https://github.com/knative/serving/blob/main/test/e2e/securedefaults/secure_pod_defaults_test.go
# - this is best scoped around a single resource to modify and test
# - modifying the environment, such as through knative configmaps, doesn't seem to work for reverting the change on cleanup
# - securedefault is an alpha feature so mileage may vary but this was a simple looking test to attempt
---
apiVersion: chainsaw.kyverno.io/v1alpha1
kind: Test
metadata:
#!ipxe
set STREAM stable
set VERSION 39.20240112.3.0
set INSTALLDEV /dev/sda
set CONFIGURL https://gist.github.com/BobyMCbobs/9fedf0d9726839a3ca35b3e5daab6305/raw/1e63109a108e2e8634453a25918bf7c76c08f894/gistfile1.txt
set BASEURL https://builds.coreos.fedoraproject.org/prod/streams/${STREAM}/builds/${VERSION}/x86_64
kernel ${BASEURL}/fedora-coreos-${VERSION}-live-kernel-x86_64 initrd=main coreos.live.rootfs_url=${BASEURL}/fedora-coreos-${VERSION}-live-rootfs.x86_64.img coreos.inst.install_dev=${INSTALLDEV} coreos.inst.ignition_url=${CONFIGURL}
{
"ignition": { "version": "3.4.0" },
"systemd": {
"units": [
{
"name": "zincati.service",
"enabled": false
},
],
},
@BobyMCbobs
BobyMCbobs / kubectl-decodesecret
Created July 25, 2023 07:10
A small bash script to tidly base64 decode secrets
#!/bin/bash
POSITIONAL_ARGS=()
NAMESPACE=default
while [[ $# -gt 0 ]]; do
case $1 in
-n|--namespace)
NAMESPACE="$2"
shift # past argument
@BobyMCbobs
BobyMCbobs / yas-org-mode-snippet-reveal
Last active July 19, 2023 08:59
org-mode reveal snippet
# -*- mode: snippet -*-
# name: reveal
# key: <reveal
# --
* LOCAL VARS :noexport:
Local Variables:
eval: (setenv "MULTIPLEX_URL" (or (getenv "MULTIPLEX_URL") "https://reveal-multiplex.rnd-wtf.islive.xyz/"))
eval: (set-variable 'org-re-reveal-root (getenv "MULTIPLEX_URL"))
eval: (set-variable 'org-re-reveal-multiplex-url (getenv "MULTIPLEX_URL"))
@BobyMCbobs
BobyMCbobs / fedora-ws2sb.sh
Last active May 23, 2023 09:35
[proof of concept] Convert Fedora Workstation to Fedora Silverblue
#!/bin/bash
# SUPERCEDED BY
# https://github.com/ublue-os/upgrade-tools
# TODO
# - [ ] take a look at any Linux OS to Silverblue (e.g Ubuntu)
# - [ ] install previous user installed packages as overlay
# - [ ] install previous system Flatpaks
2022-12-06 22:15:09.964 [DEBUG] (coderd) <./coderd/httpmw/logger.go:54> Logger.func1.1 GET {"host": "coder.sharing.io", "path": "/api/v2/buildinfo", "proto": "HTTP/1.1", "remote_addr": "10.244.0.70", "took": "333.663µs", "status_code": 200, "latency_ms": 0, "request_id": "e10fdc58-aba8-4c69-b930-3e2042dd0113"}
2022-12-06 22:15:09.967 [DEBUG] (coderd) <./coderd/httpmw/logger.go:54> Logger.func1.1 GET {"host": "coder.sharing.io", "path": "/api/v2/entitlements", "proto": "HTTP/1.1", "remote_addr": "10.244.0.70", "took": "257.676µs", "status_code": 200, "latency_ms": 0, "request_id": "bc2799fb-c9c3-490f-8d27-d424d1b035d9"}
2022-12-06 22:15:09.995 [DEBUG] (coderd) <./coderd/httpmw/logger.go:54> Logger.func1.1 GET {"host": "coder.sharing.io", "path": "/api/v2/users/me/organizations", "proto": "HTTP/1.1", "remote_addr": "10.244.0.70", "took": "25.64382ms", "status_code": 200, "latency_ms": 25, "request_id": "2698252d-cad9-4c24-8efb-c1ea41daee7f"}
2022-12-06 22:15:10.008 [DEBUG] (coderd) <./coderd/httpmw/logger.go:54
@BobyMCbobs
BobyMCbobs / main.go
Created March 25, 2022 02:40
Find and dump all Prow job configs as JSON
package main
import (
"encoding/json"
"flag"
"fmt"
"io/ioutil"
"log"
"net/http"
"os"
@BobyMCbobs
BobyMCbobs / image-tag-hash.csv
Last active May 19, 2021 03:04
k8s-infra-image-tag-hash-map
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 9.
"addon-builder","am-i-a-manifest-list/amd64","da86e6ba6ca197bf6bc5e9d900febd906b133eaa4750e6bed647b0fbe50ed43e"
"addon-builder","latest/20180730/amd64","86e19e068cdfb7d5b60335d7ed6ba26571892a28ca79391e2f5c1bac1797221e"
"addon-builder","latest/amd64","ae70aaac32f04914947cfbc62f03d6a0772e5f496ab2d8f8fb4c487bac4545a3"
"addon-builder","test/amd64","50e71a9a26a6488680202499bc72fb31dfa1d69fe2bfb3ac6aa3bc437c9e30d9"
"addon-manager/kube-addon-manager-amd64","v9.1.2/amd64","fd8c717ac0da29bc6386a8406c74559449e1bf658175e358a3b2710088a08868"
"addon-manager/kube-addon-manager-amd64","v9.1.4/amd64","645f6420f62fcfd40c28110cf458a970f0031cd9b477d20ff148e874a65dc0bc"
"addon-manager/kube-addon-manager-amd64","v9.1.5/amd64","12afe8af2fdbbc46e9cd83f161309c9214110fa9d81503b64fb57928f2216b46"
"addon-manager/kube-addon-manager-arm64","v9.1.2/amd64","f1784c76b6b1dc2e7601ff6466ddb26f88df0f8675ae8a91f8fbc74e4f2166f4"
"addon-manager/kube-addon-manager-arm64","v9.1.4/amd64","06dd560d8b6e45a9be7943f4172acc8c465b7f334ed9954f7efc358e194583