Skip to content

Instantly share code, notes, and snippets.

@joevt
joevt / dumpvols.sh
Last active August 28, 2025 07:03
A script to help with diagnosing legacy BIOS boot issues on Macs
#!/bin/bash
#
# Get Partition Info from all disks
#
# Written by joevt updated March 20, 2025
# Patches marked "rgh" July, 2010, to dump information beyond the
# four bios partitions
#
# sudo ./dumpvols.sh > dumpvols_result.txt 2>&1
#
@joevt
joevt / KextUtil.sh
Last active March 9, 2025 06:55
Commands for kexts
#!/bin/bash
# joevt Jun 12, 2024
#10.3 Panther to 10.13 High Sierra
kextload=kextload
# Later macOS versions
command -v kextutil > /dev/null 2>&1 && kextload=kextutil
getkextidentifier () {
@dakanji
dakanji / Install_USB_Maker.sh
Last active April 26, 2026 17:44
Creates Bootable USB for Mac OS Lion to Monterey (Excluding Mavericks)
#!/usr/bin/env bash
# Install_USB_Maker.sh
# Copyright (c) 2020 - 2026 Dayo Akanji
# - dakanji@users.sourceforge.net
# Portions Copyright (c) Jeff Geerling
# - https://github.com/geerlingguy/macos-virtualbox-vm/blob/master/LICENSE
#
# MIT License
@dakanji
dakanji / myOC.tool
Last active July 8, 2022 14:20
Builds/Patches OpenCore (v0.5.x onwards)
#!/usr/bin/env bash
# myOC.tool
# A tool to patch and/or build OpenCore (v0.5.x onwards)
#
# (c) 2020-2022 Dayo Akanji <dakanji@users.sourcefoge.net>
# MIT License
# Script Params
# myOC.tool LBL_FIX GIT_TAG VARIANT RECURSE DEV_FLG NPT_VER
@sorny
sorny / x11_forwarding_macos_docker.md
Last active July 5, 2026 08:17
X11 forwarding with macOS and Docker

X11 forwarding on macOS and docker

A quick guide on how to setup X11 forwarding on macOS when using docker containers requiring a DISPLAY. Works on both Intel and M1 macs!

This guide was tested on:

  • macOS Catalina 10.15.4
  • docker desktop 2.2.0.5 (43884) - stable release
  • XQuartz 2.7.11 (xorg-server 1.18.4)
  • Macbook Pro (Intel)
@guycalledseven
guycalledseven / manual-uninstall-parallels.sh
Last active July 16, 2026 19:08
Manually remove Parallels Desktop v15 leftovers MacOS
# used different forum posts/guides to figure this out like:
# The uninstall script is located at /Library/Parallels/Parallels Service.app/Contents/Resources
# https://github.com/danijeljw/remparallels/blob/master/remprls.sh
# https://kb.parallels.com/122461
# sudo find / -iname "*parallels*"
# sudo find / -iname "*prl*"
#before uninstalling deactivate your licencse - this won't be possible after uninstall
prlsrvctl deactivate-license
@leiless
leiless / csr.c
Last active February 18, 2025 10:46
[macOS] CSR get active config programatically
#include <stdio.h>
#include <stdint.h>
#include <errno.h>
#include <string.h>
typedef uint32_t csr_config_t;
/* Those two functions are syscall */
/**
@al3xtjames
al3xtjames / pci_option_rom.tcl
Last active April 2, 2023 13:14
Hex Fiend binary template for PCI option ROMs
# PCI option ROM binary template
little_endian
set image_num 0
set image_offset 0
set has_next_image 1
while {$has_next_image == 1} {
section "ROM Header $image_num" {
@ChrisTollefson
ChrisTollefson / Boot Camp Assistant - USB Install Disk.md
Last active April 26, 2026 08:54
Boot Camp Assistant - Enabling creation of bootable USB disks for installing Windows
@pudquick
pudquick / Example.scpt
Created March 3, 2018 20:43
Make DMGs from folders
property destination_for_dmgs : "/Users/mike/Desktop"
on open the_items
repeat with an_item in the_items
set the_info to info for an_item
if kind of the_info is "Folder" then
set dmg_path to quoted form of (destination_for_dmgs & "/" & (name of the_info) & ".dmg")
set src_path to quoted form of POSIX path of an_item
set vol_name to quoted form of (name of the_info)
set command_str to "hdiutil create " & dmg_path & " -volname " & vol_name & " -srcfolder " & src_path