Skip to content

Instantly share code, notes, and snippets.

@ranvel
ranvel / disable.sh
Last active September 11, 2021 22:05
Disable bunch of #$!@ in Sierra (Version 2.1). Using Catalina? Check https://gist.github.com/pwnsdx/1217727ca57de2dd2a372afdd7a0fc21
#!/bin/bash
# IMPORTANT: You will need to disable SIP aka Rootless in order to fully execute this script, you can reenable it after.
# WARNING: It might disable things that you may not like. Please double check the services in the TODISABLE vars.
# Get active services: launchctl list | grep -v "\-\t0"
# Find a service: grep -lR [service] /System/Library/Launch* /Library/Launch* ~/Library/LaunchAgents
# Agents to disable
TODISABLE=('com.apple.security.keychainsyncingoveridsproxy' 'com.apple.personad' 'com.apple.passd' 'com.apple.screensharing.MessagesAgent' 'com.apple.CommCenter-osx' 'com.apple.Maps.mapspushd' 'com.apple.Maps.pushdaemon' 'com.apple.photoanalysisd' 'com.apple.telephonyutilities.callservicesd' 'com.apple.AirPlayUIAgent' 'com.apple.AirPortBaseStationAgent' 'com.apple.CalendarAgent' 'com.apple.DictationIM' 'com.apple.iCloudUserNotifications' 'com.apple.familycircled' 'com.apple.familycontrols.useragent' 'com.apple.familynotificationd' 'com.apple.gamed' 'com.apple.icloud.findmydeviced.findmydevi
@ranvel
ranvel / get-sources.sh
Last active April 27, 2017 19:16
Get all Apple macOS sources in one go.
#!/usr/bin/env bash
# Updated to work in 2017 from the original: http://hints.macworld.com/article.php?story=20091014194517371
# --- applesource.bash --- downloads source code for an entire Apple release
# Take input from command-line (use "10.5.8", "10.6.1", etc.)
# Example: ./get-sources.sh 10.12.4
version="macos-`echo $* | tr -d "."`"
# URL:
homepage="https://opensource.apple.com"
@ranvel
ranvel / update-names.py
Last active April 27, 2017 19:10
Rename UDF / ISO files
#!/usr/bin/env python2.7
#Usage:
#./update-names.py FILE.iso
#Always make backups.
import sys
print(sys.argv[1])
file = open(sys.argv[1], "r+b")
bytestring = ''
# DVD Titles are stored in seven location on UDF disk images
offsets = [32808, 65561, 67701, 71765, 98329, 100469, 104533]