Skip to content

Instantly share code, notes, and snippets.

View pd95's full-sized avatar

Philipp pd95

  • Freelance Software Engineer
  • Zurich, Switzerland
View GitHub Profile
@jonathantneal
jonathantneal / recovery.sh
Last active November 10, 2023 01:01
Create or update macOS Big Sur (or Catalina, or Mojave) Recovery Partition Without Reinstalling
#!/bin/sh
# Set the macOS installer path as a variable
MACOS_INSTALLER="/Applications/$(ls /Applications | grep "Install macOS")"
MOUNT_POINT="$MACOS_INSTALLER/Contents/SharedSupport"
echo "macOS installer is \"$MACOS_INSTALLER\""
# Set the target disk as a variable
TARGET=$(diskutil info "$(bless --info --getBoot)" | awk -F':' '/Volume Name/ { print $2 }' | sed -e 's/^[[:space:]]*//')
echo "Target disk is \"$TARGET\""
@toioski
toioski / script.applescript
Last active June 5, 2023 01:30
Automatically Open Safari Dev Tools for iOS Simulator
-- `menu_click`, by Jacob Rus, September 2006.
-- Ref: https://stackoverflow.com/questions/14669542/automatically-open-the-safari-debugger-when-the-iphone-simulator-is-launched
on menu_click(mList)
local appName, topMenu, r
-- Validate our input
if mList's length < 3 then error "Menu list is not long enough"
-- Set these variables for clarity and brevity later on