Skip to content

Instantly share code, notes, and snippets.

View SecureToken and sysadminctl in 10.13 (based on 10.13.2)
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
@rtrouton
rtrouton / DisableAllPoliciesInCategory.sh
Created Nov 17, 2017
This script disables all polices in a specified category on a Jamf Pro server
View DisableAllPoliciesInCategory.sh
#!/bin/bash
clear
# This script enables all polices in a specified category
# Script is adapted from purgeAllPoliciesInCategory.bash by Jeffrey Compton, https://twitter.com/igeekjsc
# https://github.com/igeekjsc/JSSAPIScripts/blob/master/purgeAllPoliciesInCategory.bash
#Authenticate
read -p "Please enter your JSS URL (e.g. https://myJSS.myCompany.com:8443/) : " jssURL
@rtrouton
rtrouton / EnableAllPoliciesInCategory.sh
Created Nov 17, 2017
This script enables all polices in a specified category on a Jamf Pro server
View EnableAllPoliciesInCategory.sh
#!/bin/bash
clear
# This script enables all polices in a specified category
# Script is adapted from purgeAllPoliciesInCategory.bash by Jeffrey Compton, https://twitter.com/igeekjsc
# https://github.com/igeekjsc/JSSAPIScripts/blob/master/purgeAllPoliciesInCategory.bash
#Authenticate
read -p "Please enter your JSS URL (e.g. https://myJSS.myCompany.com:8443/) : " jssURL
@rtrouton
rtrouton / gist:cc3130e314ecb4f4284e05c9f17fd4fc
Created Apr 28, 2017
Xcode watchOS simulator download URLs (as of Xcode 8.3.1)
View gist:cc3130e314ecb4f4284e05c9f17fd4fc
watchOS 2.2 Simulator: https://devimages.apple.com.edgekey.net/downloads/xcode/simulators/com.apple.pkg.WatchSimulatorSDK2_2-2.2.1.1460407064.dmg
watchOS 2.1 Simulator: https://devimages.apple.com.edgekey.net/downloads/xcode/simulators/com.apple.pkg.WatchSimulatorSDK2_1-2.1.1.1451948363.dmg
watchOS 2.0 Simulator: https://devimages.apple.com.edgekey.net/downloads/xcode/simulators/com.apple.pkg.WatchSimulatorSDK2_0-2.0.1.1446084258.dmg
@rtrouton
rtrouton / gist:9a90b10c669323df65eec8eb8956cc5d
Created Apr 28, 2017
Xcode tvOS simulator download URLs (as of Xcode 8.3.1)
View gist:9a90b10c669323df65eec8eb8956cc5d
tvOS 10.1 Simulator: https://devimages-cdn.apple.com/downloads/xcode/simulators/com.apple.pkg.AppleTVSimulatorSDK10_1-10.1.1.1484185528.dmg
tvOS 10.0 Simulator: https://devimages-cdn.apple.com/downloads/xcode/simulators/com.apple.pkg.AppleTVSimulatorSDK10_0-10.0.1.1474488730.dmg
tvOS 9.2 Simulator: https://devimages.apple.com.edgekey.net/downloads/xcode/simulators/com.apple.pkg.AppleTVSimulatorSDK9_2-9.2.1.1460407064.dmg
tvOS 9.1 Simulator: https://devimages.apple.com.edgekey.net/downloads/xcode/simulators/com.apple.pkg.AppleTVSimulatorSDK9_1-9.1.1.1451953694.dmg
tvOS 9.0 Simulator: https://devimages.apple.com.edgekey.net/downloads/xcode/simulators/com.apple.pkg.AppleTVSimulatorSDK9_0-9.0.1.1446152618.dmg
@rtrouton
rtrouton / gist:2ca6f001b3cecb5037825c7f9d2e422e
Created Apr 28, 2017
Xcode iOS simulator download URLs (as of Xcode 8.3.1)
View gist:2ca6f001b3cecb5037825c7f9d2e422e
iOS 10.2 Simulator: https://devimages-cdn.apple.com/downloads/xcode/simulators/com.apple.pkg.iPhoneSimulatorSDK10_2-10.2.1.1484185528.dmg
iOS 10.1 Simulator: https://devimages-cdn.apple.com/downloads/xcode/simulators/com.apple.pkg.iPhoneSimulatorSDK10_1-10.1.1.1476902849.dmg
iOS 10.0 Simulator: https://devimages-cdn.apple.com/downloads/xcode/simulators/com.apple.pkg.iPhoneSimulatorSDK10_0-10.0.1.1474488730.dmg
iOS 9.3 Simulator: https://devimages.apple.com.edgekey.net/downloads/xcode/simulators/com.apple.pkg.iPhoneSimulatorSDK9_3-9.3.1.1460411551.dmg
iOS 9.2 Simulator: https://devimages.apple.com.edgekey.net/downloads/xcode/simulators/com.apple.pkg.iPhoneSimulatorSDK9_2-9.2.1.1451951473.dmg
iOS 9.1 Simulator: https://devimages.apple.com.edgekey.net/downloads/xcode/simulators/com.apple.pkg.iPhoneSimulatorSDK9_1-9.1.1.1446593668.dmg
iOS 9.0 Simulator: https://devimages.apple.com.edgekey.net/downloads/xcode/simulators/com.apple.pkg.iPhoneSimulatorSDK9_0-9.0.1.1443554484.dmg
iOS 8.4 Simulator: https://devimages.a
View how-to-download-iOS-simulator-in-command-line-and-install-it.md

How to Download iOS Simulator (Xcode) in Command Line and Install it

For faster connection speed and more flexibility.

Steps

  1. Start Xcode in command line by running this in commandline /Applications/Xcode.app/Contents/MacOS/Xcode
  2. Start downloading of the simulator
  3. Cancel it. YES CANCEL IT!
  4. You will get a message like this:
@rtrouton
rtrouton / resize_vm_boot_partition.sh
Created Mar 3, 2017
Resize boot volume using diskutil to occupy all available space on the partition
View resize_vm_boot_partition.sh
#!/bin/bash
# Resize boot volume to occupy all available space on the partition
/usr/sbin/diskutil resizeVolume / R
@rtrouton
rtrouton / gist:3ac68ac3770ab23ebae354c581f526b7
Last active May 30, 2020
MigrateADMobileAccountToLocalAccount.command script
View gist:3ac68ac3770ab23ebae354c581f526b7
#!/bin/bash
# Modified 4/5/2019
Version=1.4
# Original source is from MigrateUserHomeToDomainAcct.sh
# Written by Patrick Gallagher - https://twitter.com/patgmac
#
# Guidance and inspiration from Lisa Davies:
# http://lisacherie.com/?p=239
#
# Modified by Rich Trouton
View getosversionfromdmg.py
#!/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:
You can’t perform that action at this time.