Skip to content

Instantly share code, notes, and snippets.

View frobware's full-sized avatar

Andrew McDermott frobware

  • Red Hat
  • UK
  • 05:42 (UTC +01:00)
View GitHub Profile
@frobware
frobware / bpfman-dev-container.sh
Created August 20, 2025 13:09
Create container for running bpfman in dev
#!/usr/bin/env bash
# bpfman-dev-container.sh
#
# Minimal, distrobox-free dev container with Nix mounts and sane TTY.
# /run and /tmp are tmpfs. Nix mounts only if /nix/store exists. Works
# with docker (and maybe with podman).
set -euo pipefail
Catalog: Red Hat Operators (redhat-operators)
Packages: 1
└── Package: netobserv-operator
Publisher: Red Hat
Default Channel: stable
├── Channel: stable (Current: network-observability-operator.v1.9.0)
│ ├── [OK] Bundle: network-observability-operator.v1.9.0 (v1.9.0)
│ │ >>> CREATED: 2025-06-27T08:03:00
│ │ >>> RELATED IMAGES:
#! /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