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
#!/bin/bash | |
# | |
# Start a linked clone of a VM and list available software updates. | |
declare -r FUSION_PATH="/Applications/VMware Fusion.app" | |
declare -r GUEST_USER="swup" | |
declare -r GUEST_PASSWORD="swup" | |
# Exit status constants. |
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
December 2, 2016 at 12:02:02 PM PST Starting phase: Converting disk image | |
December 2, 2016 at 12:02:02 PM PST phase: Converting disk image | |
December 2, 2016 at 12:02:02 PM PST Ejecting image | |
December 2, 2016 at 12:02:02 PM PST message: Ejecting image | |
December 2, 2016 at 12:02:02 PM PST Ejecting '/Volumes/Macintosh HD' | |
December 2, 2016 at 12:02:02 PM PST message: Ejecting '/Volumes/Macintosh HD' | |
December 2, 2016 at 12:02:02 PM PST hdiutil: detach: processing "/Volumes/Macintosh HD" | |
December 2, 2016 at 12:02:02 PM PST LetDIDriverSettleDown: calling IOServiceWaitQuiet... | |
December 2, 2016 at 12:02:02 PM PST DI_kextWaitQuiet: about to call IOServiceWaitQuiet... | |
December 2, 2016 at 12:02:02 PM PST DI_kextWaitQuiet: IOServiceWaitQuiet took 0.000002 seconds |
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
autopkg run -vv android_ndk.munki -k RELEASE='r12b' | |
Processing android_ndk.munki... | |
URLTextSearcher | |
{'Input': {'re_pattern': u'"(https:\\/\\/dl\\.google\\.com\\/android\\/repository\\/android-ndk-r12b-darwin-x86_64.zip)"', | |
'url': u'https://github.com/android-ndk/ndk/wiki'}} | |
URLTextSearcher: No value supplied for CURL_PATH, setting default value of: /usr/bin/curl | |
URLTextSearcher: No value supplied for result_output_var_name, setting default value of: match | |
URLTextSearcher: Found matching text (match): https://dl.google.com/android/repository/android-ndk-r12b-darwin-x86_64.zip | |
{'Output': {'match': 'https://dl.google.com/android/repository/android-ndk-r12b-darwin-x86_64.zip'}} | |
URLDownloader |
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
<?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>OnDemand</key> | |
<true/> | |
<key>autoremove</key> | |
<false/> | |
<key>catalogs</key> | |
<array> |
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 | |
"""Add Adobe products to user on-demand.""" | |
import sys | |
# If you need to make sure this is always in your path, use: | |
# sys.path.append('/path/to/your/lib') | |
# Example: | |
# sys.path.append('/opt/facebook/lib') | |
import adobe_tools |
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 | |
"""Adobe API tools.""" | |
import sys | |
import time | |
import json | |
import os | |
try: | |
import jwt |
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 | |
"""Adobe API tools.""" | |
import sys | |
import time | |
import json | |
import os | |
try: | |
import jwt |
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
# Ported from https://github.com/timsutton/osx-vm-templates/blob/master/scripts/support/set_kcpassword.py | |
key = [125, 137, 82, 35, 210, 188, 221, 234, 163, 185, 31] | |
key_len = key.length | |
newpasswd = [] | |
passwd.each_char do |char| | |
newpasswd << char.ord | |
end | |
r = newpasswd.length % key_len |
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
def app_paths(bundle_identifier) | |
# Search Spotlight for matching identifier, strip newlines | |
Mixlib::ShellOut.new( | |
"/usr/bin/mdfind \"kMDItemCFBundleIdentifier==#{bundle_identifier}\"" | |
).run_command.stdout.split('\n').map!(&:chomp) | |
end | |
def installed?(bundle_identifier) | |
paths = app_paths(bundle_identifier) | |
!paths.empty? |
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
paths_file = File.readlines('/etc/paths').map(&:strip) | |
[ | |
'/opt/path/to/A', | |
'/opt/path/to/B', | |
].each do|path| | |
paths_file.unshift(path) unless paths_file.include?(path) | |
end |