Skip to content

Instantly share code, notes, and snippets.

View sosiouxme's full-sized avatar

Luke Meyer sosiouxme

View GitHub Profile
@sosiouxme
sosiouxme / migrate-sbom.py
Created February 15, 2024 19:39
modifying OSBS CycloneDX SBOMs for consumption by guac or RHTPA
#!/bin/python
import json, sys
def add_version_to_dependencies(sbom_file):
# Load the SBOM JSON file
with open(sbom_file, 'r') as file:
sbom = json.load(file)
# roll back to a version guac likes
<filter kubernetes.**>
type record_transformer
enable_ruby
<record>
hostname ${(kubernetes_host rescue nil) || File.open('/etc/docker-hostname') { |f| f.readline }.rstrip}
message ${(message rescue nil) || log}
project_labels ${(kubernetes_project.metadata.labels rescue nil)}
version 1.2.0
</record>
remove_keys log,stream
<html>
<title>Test Linking into APIMAN with authToken</title>
<head>
</head>
<body>
<h1>Provide valid authToken and a link into the Apiman console</h1>
<form action="https://console.example.com/apimanui/link" method="post">
AuthToken: <input type="text" name="access_token" size="100" value="" /></br>
Redirect URL: <input type="text" name="redirect" size="100" value="https://console.example.com/apimanui/api-manager/" /></br>
<input type="submit" value="Goto Apiman Link" />
@sosiouxme
sosiouxme / gist:1666fca42e817a7e3870
Created April 28, 2015 14:02
Registry failure to report image created in v3
2015-04-27T19:54:55.627165211Z 27/Apr/2015:15:54:55 +0000 INFO: Starting new HTTPS connection (1): master.osv3.example.com
2015-04-27T19:54:55.756001159Z 27/Apr/2015:15:54:55 +0000 ERROR: unable to create openshift ImageRepositoryMapping
2015-04-27T19:54:55.756060352Z Traceback (most recent call last):
2015-04-27T19:54:55.756071925Z File "/usr/lib/python2.7/site-packages/openshift/tag_created.py", line 62, in tag_created
2015-04-27T19:54:55.756112992Z _post_repository_binding(namespace, repository, tag, value, image)
2015-04-27T19:54:55.756121585Z File "/usr/lib/python2.7/site-packages/openshift/tag_created.py", line 124, in _post_repository_binding
2015-04-27T19:54:55.756130583Z resp = requests.post(url, **postArgs)
2015-04-27T19:54:55.756138369Z File "/usr/lib/python2.7/site-packages/requests/api.py", line 88, in post
2015-04-27T19:54:55.756146611Z return request('post', url, data=data, **kwargs)
2015-04-27T19:54:55.756154428Z File "/usr/lib/python2.7/site-packages/requests/api.py", line
@sosiouxme
sosiouxme / kick.sh
Created November 11, 2012 06:34 — forked from Miciah/kick.sh
OpenShift kickstart script (using beta packages)
#!/bin/sh
# This is a sample script for kickstarting a VM according to the openshift.ks script under virt-manager, qemu+KVM, and Linux.
# You certainly need to modify at least the CMDLINE and --location below for it to be useful (unless you work at Red Hat).
set -e
if [ $# -lt 1 ]
then
printf 'Usage: %s vm_name [arg1 [arg2 [...]]]\n' "$0"