Skip to content

Instantly share code, notes, and snippets.

View jimeh's full-sized avatar

Jim Myhrberg jimeh

View GitHub Profile
@ysimonson
ysimonson / bluetooth_sleep.lua
Last active October 15, 2024 15:43
Hammerspoon script to disable bluetooth when the computer is put to sleep. Requires `blueutil` to be installed (`brew install blueutil`).
require "string"
function checkBluetoothResult(rc, stderr, stderr)
if rc ~= 0 then
print(string.format("Unexpected result executing `blueutil`: rc=%d stderr=%s stdout=%s", rc, stderr, stdout))
end
end
function bluetooth(power)
print("Setting bluetooth to " .. power)
@AllenDang
AllenDang / gccemacs.md
Last active July 7, 2024 09:42
Build gccemacs on MacOS catalina with gcc 10 installed by homebrew.
@rougier
rougier / nano-minibuffer.el
Created March 25, 2022 09:54
Minibuffer frame for Nano Emacs
;; Nicolas .P Rougier emacs configuration - mini-frame configuration
;; ---------------------------------------------------------------------
(require 'vertico)
(require 'marginalia)
(require 'mini-frame)
(defun minibuffer-setup ()
;; This prevents the header line to spill over second line
(let ((inhibit-message t))
@pudquick
pudquick / 00-reproducible-mach-o.md
Last active March 18, 2025 04:15
Reproducible Builds for macOS

Reproducible Builds for macOS

There's a neat writeup I stumbled across recently titled "Reproducible codesigning on Apple Silicon" from Keith Smiley about some gotchas when it comes to compiling a binary in a way that's repeatable and always generates the exact same byte output (which would then checksum to the exact same hash) - even if compiled on a different Mac.

In applying the suggestions I found in the blog post, I found a few other corner cases that I just wanted to get documented more explicitly somewhere.

Tools Matter

Footnote 2 from that blog post is important:

@Renegade605
Renegade605 / zfs_error_check.sh
Last active May 5, 2025 08:38
Unraid ZFS Error Notifications
#!/bin/bash
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# UNRAID ZFS ERROR NOTIFICATION SCRIPT #
# #
# Author: Renegade605 #
# GitHub: https://gist.github.com/Renegade605/8a2d41cc93fa9f01670fc9ba34177c3c #
# Last Updated: 2024-02-28 #