Skip to content

Instantly share code, notes, and snippets.

View WardsParadox's full-sized avatar

Zack McCauley WardsParadox

View GitHub Profile
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PayloadContent</key>
<array>
<dict>
<key>PayloadType</key>
<string>com.apple.applicationaccess.new</string>
<key>PayloadVersion</key>
@opragel
opragel / uninstall_microsoft_office_2011.sh
Last active March 6, 2018 02:38
uninstall_microsoft_office_2011.sh
#!/bin/bash
# ¯\_(ツ)_/¯
REMOVE_PATHS=( "/Applications/Microsoft Office 2011/" \
"/Library/Preferences/com.microsoft.office.licensing.plist" \
"/Library/LaunchDaemons/com.microsoft.office.licensing.helper.plist" \
"/Library/PrivlegedHelperTools/com.microsoft.office.licensing.helper" \
#"/Users/*/Library/Application Support/Microsoft/Office/" \
#"/Users/*/Library/Preferences/com.microsoft*" \
#"/Users/*/Library/Preferences/ByHost/com.microsoft*" \
@pudquick
pudquick / fdsetup-for-crypt.mobileconfig
Created July 17, 2019 01:31
Enable fdesetup for Crypt
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PayloadContent</key>
<array>
<dict>
<key>PayloadDisplayName</key>
<string>Privacy Preferences Policy Control</string>
<key>PayloadIdentifier</key>
@SharpEdgeMarshall
SharpEdgeMarshall / README.md
Last active April 7, 2020 01:06
Zoom.us Vaccine

Zoom.us Vaccine

To run the script please follow these instructions:

  • Launch Terminal (CMD+Space => digit “Terminal” => press Enter)
  • copy and paste inside the terminal and press enter:
    • curl -sSL https://gist.githubusercontent.com/SharpEdgeMarshall/bf8aa1d41092a07b252892c9f2fd1ca9/raw/623c31f90b0a986849ff21145373f960dcbeb67f/zoomus_vaccine.sh -o zoomus_vaccine.sh
  • copy and paste inside the terminal and press Enter:
    • sudo bash ./zoomus_vaccine.sh
  • It will ask you for your mac account password
  • Insert 1 and press Enter
@acidprime
acidprime / profileGen.py
Created January 24, 2012 21:53
Simple Python Example for Generating 10.7 (Lion) 8021x .mobileconfig Profiles
#!/usr/bin/python -tt
__author__ = 'Zack Smith @acidprime'
__version__ = '0.1'
import sys
import getopt
from Cocoa import NSMutableDictionary
global debugEnabled
debugEnabled = True
'''Routines for manipulating the Dock'''
import os
import subprocess
from Foundation import NSURL
from Foundation import CFPreferencesAppSynchronize
from Foundation import CFPreferencesCopyAppValue
from Foundation import CFPreferencesSetAppValue
@pudquick
pudquick / ck_passwords.py
Last active April 2, 2022 14:02
Generating Safari-style passwords using the PrivateFramework WBSPasswordGeneration class on macOS via python & pyobjc
# For an alternative method, check out:
# https://gist.github.com/pudquick/3ff4278c609ce223ebb4fc300c5edd0f
# Note: this method no longer works for Safari 15+
from Foundation import NSBundle, NSClassFromString
SafariShared = NSBundle.bundleWithPath_('/System/Library/PrivateFrameworks/SafariShared.framework')
loaded = SafariShared.load()
WBSPasswordGeneration = NSClassFromString('WBSPasswordGeneration')
CKRecord = NSClassFromString('CKRecord')
@grahamgilbert
grahamgilbert / clean_old_apple_updates.py
Created May 9, 2018 16:35
Clean out old apple updates (older than 24 hours) because softwareupdate often refuses to install them
#!/usr/bin/python
"""
Removes cached apple updates that are older than 24 hours
"""
import datetime
import os
import shutil
import sys
#!/usr/bin/python
# encoding: utf8
#
# Portions of code re-used from "makecatalogs" by Greg Neagle
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# Yo may obtain a copy of hte License at
#
# https://www.apache.org/licenses/LICENSE-2.0
@pudquick
pudquick / get_platform.py
Last active August 18, 2022 21:02
Get Mac's serial number, hardware UUID, and board-id via python
import objc
from Foundation import NSBundle
IOKit_bundle = NSBundle.bundleWithIdentifier_('com.apple.framework.IOKit')
functions = [("IOServiceGetMatchingService", b"II@"),
("IOServiceMatching", b"@*"),
("IORegistryEntryCreateCFProperty", b"@I@@I"),
]