Skip to content

Instantly share code, notes, and snippets.

@font-face {
font-family: "";
/* Add other properties here, as needed. For example: */
/*
font-weight: 100 900;
font-style: normal italic;
*/
src: url(data:application/octet-stream;base64,d09GMgABAAAAAIkEABEAAAABZMwAAIifAAEFYAAAAAAAAAAAAAAAAAAAAAAAAAAAGoEWG4GHIhyoDAZgAIlkCGwJnBURCAqDqiCC9HEBNgIkA5FUC4hsAAQgBYcfB6BZDIE9W4REcYRc91sVOei5balkI7jSUiObOzXM9NzGrxiNVraKsc2i2e0A09W/V8r+//9PPioyZhpI221DABHxihdighyybiQTgiOMmwxTwtQomSSMIDikaBD6ZHsMraI3EZcglpOTsHWewixaJTiW3HRHRW27SMdEHtwhEZmd+MSPJY2E9hTV6ajmlRBTY7s71eC/A5vMe3HzsY4WtLM1qcZ0lBnNLKwYJxpyMI3XHH7Ejs9VrZDtXMp3w4yONTVPt2JKYs1p+68m+7e2jvIwny9W9J+ePtCNrKxk3rgQ/DfyyV7QCNfIvsynP2wMSZkN4j+kSIqE0eD5qztx3CB7uZKKxRGBNz2Gz+S+sgtiHUK1cQRvT5LjmzCdVPovjc/WGLsGhKRUk2GPflJB38XzH1m9h/cJ8peJ+Xl+bn/OfW/jLdnIGD1AqWi7wYrZWMVHPnZjkVNSidQm2sBqYoB08x8cZMIuhJGEBEgY2fsyN1lAJuwwZKoMRVmKRZzVtlgcY4Q6imt3W59dv7V2bD/W96rgZoQFlPOXzMJtfy2tVCCkgQ/VYT7p1DLMnn/8aeIy/TJlGX72/dhK4zshpclOQojcObk0uTQZjAyiS0dz/5mXnWRpdrIUoA9Iyp4VxJZIncKWVVVZVTUAjnTm/0iWSSatgL2CBZHNZ3OSCcE9xKZ79ceuD9r//
vmaccepteula
install --firstdisk --overwritevmfs --novmfsondisk
network --bootproto=dhcp
rootpw Password123!!
keyboard English
reboot
%firstboot --interpreter=busybox
@ToroNZ
ToroNZ / errata-report-to-html.sh
Last active June 14, 2021 02:42
Katello-content-host-report-HTML
#!/bin/bash
# Get list of hosts and outstanding errata from Satellite
hammer --csv content-hosts --export --columns "Name,OS,Security Errata,Bug Fix Errata,Enhancement Errata" --file /var/www/html/pub/errata.all.csv.txt
# Now create an html file from the CSV file
html_file=/var/www/html/pub/errata.html
( echo "<html>
<head><title>Contents Hosts Outstanding Errata</title>
</head>
@ToroNZ
ToroNZ / env-to-json.py
Last active August 24, 2020 06:02
(python3) Get all ENV variables into JSON
#!/usr/bin/env python3
import os
import json
ENV_LIST = dict(os.environ.items())
VALUES = [{"key": k, "value": v, "secured": "true"} for k, v in ENV_LIST.items()]
LOCAL_VARS = json.dumps(VALUES, indent=4)
# Meant to be invoked in shell as '$ python3 env-to-json.py > local_vars.json'
#!/bin/bash
# Help.
if [[ "$1" == "-h" || "$1" == "--help" ]]; then
echo 'Usage: teams-chat-post.sh "<webhook_url>" "<title>" "<color>" "<message>"'
exit 0
fi
# Webhook or Token.
WEBHOOK_URL=$1
if [[ "${WEBHOOK_URL}" == "" ]]
Request# Activate Forms REST API Endpoint Activate Openshift role Observations Example
1 Create/Delete Project POST /apis/project.openshift.io/v1/projectrequests
DELETE /apis/project.openshift.io/v1/projects
activate-project JSON schema defined here Create
curl -XPOST -H "Authorization: Bearer $TOKEN" -H "Accept: application/json" -H "Content-Type: application/json" https://$API_URL:8443/apis/project.openshift.io/v1/projectrequests -d {JSON}
Delete
curl -XDELETE -H "Authorization: Bearer $TOKEN" -H 'Accept: application/json' https://$API_URL/apis/project.openshift.io/v1/projects/$PROJECT_NAME
2 Sync groups POST /apis/user.openshift.io/v1/groups activate-groups-sync Syncs AD groups with Openshift ones.
JSON schema defined here
TBC - Tomas to define exactly how we are going to do this.
3 Bind Role `POST /apis/rbac.authorization.k8s.io/v1beta1/namespaces/$PROJECT_NAME/rolebin
@ToroNZ
ToroNZ / locktest.c
Created January 23, 2019 01:54
Lockfile test to see NFS CB_NOTIFY_LOCK behaviour between Linux/BSD NFS server implementations.
/*
* locktest.c
*
* Lock a file (block until we have a lock), write a message to the file, and
* sleep for a while. If we run multiple of these at once in a loop, we can show
* that file system locking is working correctly.
*
* USAGE:
* locktest.exe FILENAME SECONDS MESSAGE NUMRUNS
*
@ToroNZ
ToroNZ / log-watcher.sh
Created January 15, 2019 01:39
watch nfs logs
#!/bin/bash
# Author: Matt Owens <[email protected]>
#
# This script watches for messages in a specific log file
#
pids=$$
FILE="$1"
PIPE="$2"
@ToroNZ
ToroNZ / ipvs-modules
Created November 8, 2018 01:50
modules required for ipvs kube-router in fedora
ip_vs
ip_vs_rr
ip_vs_wrr
ip_vs_sh
nf_conntrack_ipv4
@ToroNZ
ToroNZ / expose_kube-dash.yaml
Last active April 20, 2018 04:33
Expose Kubernetes Dashboard
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: kube-dash
namespace: kube-system
annotations:
kubernetes.io/ingress.class: traefik
spec:
rules:
- host: kube-dash.k8s.example.org