Skip to content

Instantly share code, notes, and snippets.

View frobware's full-sized avatar

Andrew McDermott frobware

  • Red Hat
  • UK
  • 17:58 (UTC +01:00)
View GitHub Profile
#! /usr/bin/env bash
set -eu
# https://ostechnix.com/import-qcow2-into-proxmox/
storage=local-zfs
vmid=9115
image=Fedora-Cloud-Base-Generic-41-1.4.x86_64.qcow2
name=fedora-41-template
@frobware
frobware / s390.log
Created February 14, 2025 17:17
s390 cross-build
#0 building with "default" instance using docker driver
#1 [internal] load build definition from Containerfile.cross-build
#1 transferring dockerfile: 1.83kB done
#1 DONE 0.0s
#2 [internal] load metadata for docker.io/library/rust:latest
#2 ...
#3 [internal] load metadata for docker.io/library/debian:bullseye-slim
@frobware
frobware / wait.go
Created January 9, 2025 14:18
waitForDeploymentCompleteAndNoOldPods
//go:build e2e
// +build e2e
package e2e
import (
"context"
"fmt"
"testing"
"time"
@frobware
frobware / cmd-key-happy.swift
Created January 3, 2025 09:44
cmd-key-happy in Swift
import Cocoa
import CoreGraphics
import Foundation
class CmdKeyHappy {
func cleanup() {
print("Cleaning up CmdKeyHappy...")
for (pid, tap) in tapMap {
print("Removing tap for PID: \(pid)")
CFMachPortInvalidate(tap)
@frobware
frobware / config
Created January 2, 2025 12:12
ghostty config
# keybind = alt+physical:one=unbind
# keybind = alt+physical:two=unbind
# keybind = alt+physical:three=unbind
# keybind = alt+physical:four=unbind
# keybind = alt+physical:five=unbind
#keybind = clear
keybind = shift+up=adjust_selection:up
keybind = shift+left=adjust_selection:left
@frobware
frobware / ghostty-keybindings.sh
Last active January 10, 2025 19:04
ghostty-customize-menu-shortcuts
#!/usr/bin/env bash
# Reset and customise menu bar shortcuts for the Ghostty macOS app.
# Restart the app to apply the new bindings.
set -euo pipefail
# Constants for modifier keys.
CMD="@"
CTRL="^"
@frobware
frobware / BUILD-OPENSSL-1.md
Last active November 11, 2024 13:26
Running OpenShift's HAProxy Linked Against OpenSSL 1.1 on Modern RHEL/Fedora Systems

These instructions explain how to build OpenSSL 1.1 and the traditional libcrypt (specifically libcrypt.so.1 from older versions of glibc). This enables us to run versions of OpenShift's HAProxy that were linked against OpenSSL 1.1 and the older libcrypt on RHEL/Fedora systems where the runtime platform now only provides OpenSSL 3 and the newer libxcrypt. We need the older libcrypt because the OpenShift HAProxy build depends on it, and the newer libxcrypt is not fully backward compatible with the original libcrypt.

Build OpenSSL 1.1.1 on Fedora 40 (possibly RHEL?)

@frobware
frobware / cross-build.sh
Created September 10, 2024 13:06
cross-build bpfman using rust image.
#!/usr/bin/env bash
set -eu
# Detect the host architecture dynamically
host_arch=$(uname -m)
# Map common architecture names to their corresponding Rust target format.
arch_map() {
case "$1" in
@frobware
frobware / bpfdaemon.yaml
Created August 28, 2024 13:00
bpfdaemon with Nix paths mounted
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: daemon
namespace: kube-system
spec:
template:
spec:
containers:
- name: bpfman-supervisor