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:
| #!/bin/sh | |
| #fix for custom guest login keychain errors | |
| LOGGER="/usr/bin/logger" | |
| GID=`id -g` | |
| if [[ ${GID} == 201 ]]; then | |
| $LOGGER -s -t fix.guest.keychain.sh "Current user is guest. Creating a login.keychain" 1>&2 | |
| security create-keychain -p "" login.keychain | |
| security login-keychain -s ~/Library/Keychains/login.keychain |
| #!/bin/bash | |
| ### ACTIVE DIRECTORY USER PERMISSIONS SCRIPT ### | |
| ### by Graham Pugh | |
| ### Props to Jeff Kelley, Graham Gilbert and various others for elements of script | |
| ### This script looks at the "Allow Administration By" field of the | |
| ### `dsconfigad -show` command and checks each of the Active Directory users | |
| ### with mobile accounts on the computer to check whether they should have | |
| ### local admin rights. It amends each user's membership of the local |
| #!/bin/bash | |
| # Add the user and group used by Tomcat on your Linux | |
| # server. For Casper 9.x running on Red Hat Enterprise | |
| # Linux, the user and group are filled in below. | |
| linux_tomcat_user="tomcat7" | |
| linux_tomcat_group="tomcat7" | |
| # Add the user and group used by Tomcat on your Linux |
| #!/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 |
| ###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 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 |
| # 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 |
| #!/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: |
| #!/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: |
For faster connection speed and more flexibility.
/Applications/Xcode.app/Contents/MacOS/Xcode