Skip to content

Instantly share code, notes, and snippets.

View jmarhee's full-sized avatar

jdm jmarhee

View GitHub Profile
#!/bin/bash
## Assumes a filename ${artist} - ${title}.mp3
## If not already in mp3:
# for f in *.m4a; do ffmpeg -i "$f" -vn -ar 44100 -ac 2 -b:a 192k "${f%.*}.mp3"; done
## Assumes album cover art at ./cover.jpg
ALBUM_NAME=$1
ALBUM_ARTIST=$2
[Desktop Entry]
Version=1.0
Type=Application
Exec=icecat %u
Terminal=false
X-MultipleArgs=false
Icon=icecat
StartupWMClass=icecat-default
Categories=GNOME;GTK;Network;WebBrowser;
MimeType=application/json;application/pdf;application/rdf+xml;application/rss+xml;application/x-xpinstall;application/xhtml+xml;application/xml;audio/flac;audio/ogg;audio/webm;image/avif;image/gif;image/jpeg;image/png;image/svg+xml;image/webp;text/html;text/xml;video/ogg;video/webm;x-scheme-handler/chrome;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/mailto;
#!/bin/bash
KUBECONFIG_DIR=$HOME/.kube
mkdir -p "$KUBECONFIG_DIR"
clusters=$(rancher clusters ls --format '{{.Cluster.Name}}')
for cluster in $clusters; do
echo "Downloading kubeconfig for cluster: $cluster"
#!/bin/bash
###
# From https://www.reddit.com/r/Ubuntu/comments/u8uto5/ubuntu_2204_pipewire_setup/
###
###
# Validated for the following configuration:
# ----------
# OS: Zorin OS 17.3 x86_64 (Ubuntu 22.04 base)
#!/bin/bash
# Check if the directory is provided as an argument
if [ $# -eq 0 ]; then
echo "Usage: $0 <directory>"
exit 1
fi
# Directory containing the audio files
DIRECTORY=$1
@jmarhee
jmarhee / additional_manifests.yaml
Last active September 18, 2025 17:22
Configure MetalLB VIP (192.168.1.101) to be Service IP for Nginx Ingress
---
apiVersion: helm.cattle.io/v1
kind: HelmChart
metadata:
namespace: kube-system
name: metallb
spec:
targetNamespace: metallb-system
createNamespace: true
version: v0.14.8
#!/bin/bash
RANCHER_URL=$RANCHER_API_URL
API_TOKEN=$RANCHER_API_TOKEN
OLD_ROLE_NAME="Restricted Admin"
NEW_ROLE_NAME=""
get_role_id_by_name() {
local role_name=$1
@jmarhee
jmarhee / os-files-etc-fstab
Last active February 11, 2025 19:16
Goes into $ELEM/os-files/etc/fstab
## Default SLE Micro root filesystem
LABEL=ROOT / btrfs ro 0 0
LABEL=ROOT /.snapshots btrfs defaults,subvol=@/.snapshots 0 0
LABEL=ROOT /home btrfs defaults,subvol=@/home 0 0
LABEL=ROOT /opt btrfs defaults,subvol=@/opt 0 0
LABEL=ROOT /root btrfs defaults,subvol=@/root,x-initrd.mount 0 0
LABEL=ROOT /srv btrfs defaults,subvol=@/srv 0 0
LABEL=ROOT /var btrfs defaults,subvol=@/var,x-initrd.mount 0 0
LABEL=EFI /boot/efi vfat defaults 0 0
LABEL=ROOT /boot/writable btrfs defaults,subvol=@/boot/writable 0 0
#!/bin/bash
# Create a namespace for the benchmark
kubectl create namespace storage-benchmark
# Deploy Rancher Local Path Provisioner
kubectl apply -f https://raw.githubusercontent.com/rancher/local-path-provisioner/master/deploy/local-path-storage.yaml
# Deploy DirectPV (assuming you have a YAML file for DirectPV deployment)
kubectl apply -f directpv-deployment.yaml
{
"app-id": "com.example.Clio",
"runtime": "org.freedesktop.Platform",
"runtime-version": "21.08",
"sdk": "org.freedesktop.Sdk",
"command": "clio",
"modules": [
{
"name": "clio",
"buildsystem": "simple",