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:
| <?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>PayloadCertificateFileName</key> | |
| <string>my.org.cer</string> | |
| <key>PayloadContent</key> |
| #!/usr/bin/python | |
| # pylint: disable=E0611, E1101, E0602 | |
| ''''Fix 802.1x When Using Config Profiles and PEAP-MSCHAPV2 or EAP-TLS''' | |
| # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # | |
| # | |
| # This script will find the system profile that is attached to one ethernet | |
| # interface from our configuration profile and then copy it to all other | |
| # ethernet interfaces so that other ethernet interfaces can be used instead | |
| # of just the FirstActiveEthernet at time of profile installation. This issue | |
| # is still an issue as of 10.12.3 |
| #!/usr/bin/python | |
| # pylint: disable=C0103, W0612, E1101, E0602, E0611 | |
| # pylint: disable=W0101, W0110, W0141 | |
| ''''Fix 802.1x When Using Config Profiles and EAP-TLS''' | |
| # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # | |
| # | |
| # This script will determine the profile ID that was used when | |
| # installing the 802.1x Ethernet Identity preference and make | |
| # a copy of the keychain entry to be used as a user identity preference | |
| # so that any Ethernet can be used when a user is logged in. As of 10.12.3 |
For faster connection speed and more flexibility.
/Applications/Xcode.app/Contents/MacOS/Xcode| #!/usr/bin/python | |
| """ | |
| Removes cached apple updates that are older than 24 hours | |
| """ | |
| import datetime | |
| import os | |
| import shutil | |
| import sys |
| # hax hax hax hax hax | |
| import ctypes, os, sys | |
| newstderr = os.dup(2) # This is to mute dyld LC_RPATH warnings | |
| os.dup2(os.open('/dev/null', os.O_WRONLY), 2) # because we're loading Xcode frameworks from python | |
| CM = ctypes.CDLL('/Applications/Xcode.app/Contents/SharedFrameworks/DVTMarkup.framework/Versions/A/Frameworks/CommonMark.framework/CommonMark') | |
| sys.stderr = os.fdopen(newstderr, 'w') # This restores stderr | |
| cmark_markdown_to_html = CM.cmark_markdown_to_html | |
| cmark_markdown_to_html.restype = ctypes.c_char_p |
| #!/usr/bin/python | |
| import grp, pwd, os | |
| from ctypes import * | |
| from ctypes.util import find_library | |
| libc = cdll.LoadLibrary(find_library('libc')) | |
| # getgrouplist_2() is an undocumented API which, I beleive, retrives all of | |
| # a user's groups instead of the maximum 16 groups which getgrouplist() gets |
| #!/usr/bin/python | |
| # As written, this requires the following: | |
| # - OS X 10.6+ (may not work in 10.10, haven't tested) | |
| # - python 2.6 or 2.7 (for collections.namedtuple usage, should be fine as default python in 10.6 is 2.6) | |
| # - pyObjC (as such, recommended to be used with native OS X python install) | |
| # Only tested and confirmed to work against 10.9.5 | |
| # Run with root |
| import struct, objc | |
| from Foundation import NSBundle | |
| from Cocoa import NSAppleEventDescriptor | |
| def OSType(s): | |
| # Convert 4 character code into 4 byte integer | |
| return struct.unpack('>I', s)[0] | |
| # Create an opaque pointer type to mask the raw AEDesc pointers we'll throw around | |
| AEDescRef = objc.createOpaquePointerType('AEDescRef', '^{AEDesc=I^^{OpaqueAEDataStorageType}}') |
| require 'base64' | |
| require 'plist' | |
| module Chef::Provider::User::DsclMojaveUserExtensions | |
| # new for 10.14+ | |
| def mac_osx_version_greater_than_10_13? | |
| Gem::Version.new(node['platform_version']) > Gem::Version.new('10.13.99') | |
| end | |
| # updated for 10.14+ |