pkgbuild --component /Volumes/ApplicationName/*.app --install-location \
/Applications ApplicationName-Version.pkg
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://www.apple.com/macos/macos-sequoia-preview/ | |
Published Date: June 10, 2024 | |
Verification: https://regex101.com/r/bNOMXz/2 | |
1) Exact regex — Matches major model identifier numbers based on Apple's knowledge base article (more accurate): | |
^(Mac(1[345]|BookPro1[5-8]|BookAir(9|10)|Pro7)|iMac(Pro1|(19|2[01]))|Macmini[89]),\d+$ | |
2) Current or higher regex — Matches model identifiers based on Apple's knowledge base article and may match higher versions before this regex is updated (more future-proof). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sysadminctl is a tool Apple introduced in 10.10 for working with system user accounts. In 10.13, | |
sysadminctl is Apple's recommended tool for working with user accounts in the CLI, replacing functionality | |
that has long been provided by dscl and adds new features available only in 10.13. | |
sysadminctl can be used to change user passwords, create new users (including automatically provisioning | |
the user home folder) or check the status of a new-to-10.13 security feature named SecureToken. | |
SecureToken is a user attribute like password type or user home location. SecureToken is not publicly | |
documented by Apple so it is not possible to provide a full technical description, but in practice one | |
needs only to know if a user has SecureToken or not. Having SecureToken set signifies that a user can | |
unlock a FileVault-encrypted volume. Without the SecureToken bit on a user account, that user will not |
For faster connection speed and more flexibility.
- Start Xcode in command line by running this in commandline
/Applications/Xcode.app/Contents/MacOS/Xcode
- Start downloading of the simulator
- Cancel it. YES CANCEL IT!
- You will get a message like this:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# | |
# getosversionfromdmg.py | |
# | |
# Copyright (c) 2014 The Regents of the University of Michigan | |
# | |
# Retrieves the OS version and build from the InstallESD.dmg contained in | |
# a typical "Install (Mac) OS X <Name>.app" bundle. | |
# | |
# To run: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
"""Enables location services, allows Maps and Timezone""" | |
import os | |
import platform | |
import subprocess | |
import sys | |
try: | |
sys.path.append('/usr/local/munki/munkilib/') | |
import FoundationPlist | |
except ImportError as error: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Tested on 10.11 | |
# Assumes your network is in a state to actually do the discovery | |
# (Generally this means wifi enabled on your device and network stack is up) | |
# | |
# Note: When this code exits, it will generate an error message - this is to be expected! | |
# Error will look like: | |
# Python[3056:158489] PyObjC: Exception during dealloc of proxy: Cannot remove an observer <TimeZonePref 0x7f846b4b6710> | |
# for the key path "enabled" from <ATZAdminPrefererences 0x7f846b502a30> because it is not registered as an observer. | |
# | |
# This is because we're cheating with the initialization of a TimeZonePref class to get cheap access to |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This code must run as root | |
# We're mixing ObjC and C-style dylibs, so this is really fun | |
# The only reason we're doing this is that the OS is _really really_ picky about trying to do | |
# ANYTHING with the CoreStorage Family Properties CFDictionary that's in-memory EXCEPT for | |
# making a mutable copy of it. | |
# Once we've done that, we can bring it into pyObjC to play nicely with the data. | |
import objc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
###Test Code### | |
### Intention is to figure out what JDK the user has installed. | |
### our current Ext atty reports the JRE, we need to know they have the JDK | |
## thanks to elliotjordon | |
## -00 is just a number to say that JDK is not installed. makes for better smartgroup searches | |
############### | |
if JDKver=$(ls "/Library/Java/JavaVirtualMachines" | awk -F "_|.jdk" '/.jdk/{print $2}' | tail -1) | |
then | |
echo "<result>$JDKver</result>" | |
# else |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import plistlib, os.path | |
# Based off of https://forums.developer.apple.com/message/6741 | |
def jdk_info_plists(): | |
# Find all the JDK Info.plist files | |
JDK_ROOT = "/Library/Java/JavaVirtualMachines" | |
if (os.path.exists(JDK_ROOT) and os.path.isdir(JDK_ROOT)): | |
# It's present, let's look for installs |
NewerOlder