Skip to content

Instantly share code, notes, and snippets.

# download the latest ‘Install macOS’ application to this Mac’s /Applications folder.
softwareupdate --fetch-full-installer
# download a specific macOS insatller version
softwareupdate --fetch-full-installer --full-installer-version 10.14.6
Mac OS Launch paths
~/Library/LaunchAgents
User Agents, Currently logged in user
/Library/LaunchAgents
Global Agents, Currently logged in user
/Library/LaunchDaemons
Global Daemons, root or the user specified with the key UserName
Make a MacOS .iso from an installer
from https://www.geekrar.com/create-macos-catalina-iso-file/
Catalina example
Create a DMG Disk Image
hdiutil create -o /tmp/Catalina -size 8500m -volname Catalina -layout SPUD -fs HFS+J
Mount it to your macOS
hdiutil attach /tmp/Catalina.dmg -noverify -mountpoint /Volumes/Catalina
Installer activation:
The password is the CRC-32 hash of the username
i.e.
user
0x8D93D649
brew install gcc curl dfu-util gdb-multiarch git python python-pip
# install gcc-arm-none-eabi from
https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/downloads
mkdir -p /usr/local && cd /usr/local
tar xjf gcc-arm-none-eabi-8-2019-q3-update-mac.tar.bz2
PATH=$PATH:/usr/local/gcc-arm-none-eabi-8-2019-q3-update/bin
git clone https://github.com/jsnyder/stm32loader
@patrickgill
patrickgill / pc_startup_keys.txt
Last active January 4, 2021 14:36
PC Startup Keys
LENOVO
F1 BIOS Setup
F12 Boot menu
HP
F1
F2 Diagnostics
F9 Boot Menu
F10 BIOS Setup
F11 System Recovery
#human readble size
tree -h > fsstruct.txt
#specify path
tree -h /path/ > fsstruct.txt
#du
sudo du -h /path/ 2>/dev/null
@patrickgill
patrickgill / mac_boot_options.txt
Last active January 6, 2020 05:20
Apple Mac boot options
Mac boot options
Hold keys at startup.
Startup Manager: Option (⌥)
Set boot source as default: Get to Startup manager then hold Control while selecting the disk
Boot from CD/DVD/USB: C
Target Disk Mode: T
Check for Option ROM firmware: Option-Shift-Command-Period
Safe Mode: Shift (⇧)
#!/bin/bash
# Disable failed GPU on Macbook Pro (2011)
sudo nvram boot-args="-v"
sudo nvram fa4ce28d-b62f-4c99-9cc3-6815686e30f9:gpu-power-prefs=%01%00%00%00
exit 0