Skip to content

Instantly share code, notes, and snippets.

Nick McSpadden nmcspadden

Block or report user

Report or block nmcspadden

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@nmcspadden
nmcspadden / swuprun.sh
Created Dec 3, 2016 — forked from MagerValp/swuprun.sh
Start a linked clone of a VM and list available software updates.
View swuprun.sh
#!/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.
View gist:c806fe30392778f03be9d7e198cbc8a4
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
View android_ndk traceback
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
View AddAdobeCCAPI_photoshop.plist
<?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>
View WP_adobeapi_add_adobe.py
#!/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
View WP_adobeapi_adobetools.py
#!/usr/bin/python
"""Adobe API tools."""
import sys
import time
import json
import os
try:
import jwt
View WP_adobeapi_start.py
#!/usr/bin/python
"""Adobe API tools."""
import sys
import time
import json
import os
try:
import jwt
View kcpassword.rb
# 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
View CPE_utils.rb
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?
View sample.rb
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
You can’t perform that action at this time.