Skip to content

Instantly share code, notes, and snippets.

@startergo
startergo / macOS-in-virtualbox.md
Created June 26, 2020 13:30 — forked from rob-smallshire/macOS-in-virtualbox.md
Notes on getting macOS Sierra running in Virtualbox on a Windows 10 host

On Mac

Download, but don't run, the Sierra installer from the Mac App Store. This places the installer at /Applications/Install\ macOS\ Sierra.app/.

Now run the following commands to build a suitable VM image from the installer:

git clone https://github.com/jonanh/osx-vm-templates
cd osx-vm-templates/packer

sudo ../prepare_iso/prepare_vdi.sh -D DISABLE_REMOTE_MANAGEMENT -o macOS_10.12.vdi /Applications/Install\ macOS\ Sierra.app/ .

[wsl2]
kernel=C:\\Users\\JAKA\\vmlinux
@startergo
startergo / myOC.tool
Created August 28, 2020 15:41 — forked from dakanji/myOC.tool
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 Dayo Akanji <dakanji@users.sourcefoge.net>
# MIT License
# Script Params
# LBL_FIX : '0' (Default) or any other value to address drive APFS Label Bug.
@startergo
startergo / modifyedid.py
Created October 31, 2020 22:23 — forked from xxxzc/modifyedid.py
Get and modify laptop 4k display edid for big sur
# Get and modify laptop 4k display edid for big sur
# Created by xxxzc
# Reference: http://bbs.pcbeta.com/forum.php?mod=viewthread&tid=1866466&highlight=edid
from subprocess import check_output
from base64 import b64encode
edid = check_output('ioreg -lw0 | grep -i "IODisplayEDID"',
shell=True, encoding='utf-8')
edid = edid.split('<')[1].split('>')[0]
print('Display EDID:', edid)
edid = edid[:108] + 'a6a6' + edid[112:] # set refresh rate to 48Hz
@startergo
startergo / gfxutil.sh
Last active January 8, 2021 17:40 — forked from joevt/gfxutil.sh
macOS nvram boot variables, device properties, EFI device paths
# joevt Nov 22, 2020
# https://forums.macrumors.com/threads/documentation-on-all-parameters-for-nvram.2239034/post-28518123
gfxutilcmd=~/Downloads/gfxutil
alias gfxutil="'$gfxutilcmd'"
nvramp () {
local thename="$1"
local thedata="" # must declare local separately for $? to get the error
@startergo
startergo / EDIDUtil.sh
Created November 30, 2020 01:31 — forked from joevt/EDIDUtil.sh
A set of shell functions used to view and edit EDIDs.
# EDIDUtil.sh v5.12
# by joevt Jun 27/2020
#=========================================================================================
# Modify EDID
getarrstart () {
# bash arrays start at 0
# zsh arrays start at 1 (applies only to [] syntax) but this can be changed with "setopt ksh_arrays"
# zsh arrays start at 0 when using ${arr:x:x} syntax
@startergo
startergo / DiskUtil.sh
Last active December 26, 2021 17:53 — forked from joevt/DiskUtil.sh
macOS disk labels, mounting partitions
#!/bin/bash
# by joevt Dec 24, 2021
directblesscmd="/Volumes/Work/Programming/XcodeProjects/bless/bless-204.40.27 joevt/DerivedData/bless/Build/Products/Debug/bless"
usedirectbless=0
if [[ -d /System/Library/PrivateFrameworks/APFS.framework/Versions/A ]]; then
if [[ ! -f "$directblesscmd" ]]; then
echo "# Download and build bless from https://github.com/joevt/bless , then update the path of directbless defined in DiskUtil.sh"
else
usedirectbless=1
@startergo
startergo / osx_defaults.sh
Created December 21, 2020 14:33
OSX Defaults to setup a brand new machine
#!/usr/bin/env bash
# TODO: Need to figure out the settings for the following:
# 1) Dock: Items with order (not capturing binary data - since that is dependent on installed apps)
# 2) Security & Privacy Preferences: Full Disk Access, Camera, Microphone
# 3) Login items for my user (i.e. apps started when I login)
# 4) Retina displays
##
# This is a script with useful tips taken from: