Skip to content

Instantly share code, notes, and snippets.

@rtrouton
rtrouton / gist:3ac68ac3770ab23ebae354c581f526b7
Last active Jan 19, 2021
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 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 / gist:e6cf0f4064aea52fac2e5116c4b05f2e
Created Aug 30, 2016
Sierra compatible Macs, sorted by Model ID and board ID
View gist:e6cf0f4064aea52fac2e5116c4b05f2e
MacBook9,1: 'Mac-9AE82516C7C6B903'
iMac14,1: 'Mac-031B6874CF7F642A'
iMac10,1: 'Mac-F2268DC8'
MacBookPro8,1: 'Mac-50619A408DB004DA'
MacBook6,1: 'Mac-F22C8AC8'
MacBookPro10,2: 'Mac-AFD8A9D944EA4843'
iMac12,2: 'Mac-942B59F58194171B'
iMac14,2: 'Mac-27ADBB7B4CEE8E61'
MacBook8,2: 'Mac-F305150B0C7DEEEF'
MacBookAir6,1: 'Mac-35C1E88140C3E6CF'
@rtrouton
rtrouton / gist:ffc22da3c36c61aad0fe
Last active Dec 3, 2020
Casper extension attribute for checking AppleCare warranty status
View gist:ffc22da3c36c61aad0fe
#!/bin/sh
# this script was written to query apple's service database to determine warranty coverage
# base on a system's serial number. This updated version stores the information locally so
# as not to have to query Apple's website repeatedly.
# author: Andrew Thomson
# date: 5/30/2013
@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
@rtrouton
rtrouton / gist:8016797
Last active Jun 22, 2020
createmyguest.sh script, original by nbalonso (https://gist.github.com/nbalonso/5696340)
View gist:8016797
#!/bin/bash
# Original script by Noel B. Alonso: https://gist.github.com/nbalonso/5696340
#variables
DSCL="/usr/bin/dscl"
SECURITY="/usr/bin/security"
LOGGER="/usr/bin/logger"
# Determine OS version
@rtrouton
rtrouton / com.company.launch_beamoff.plist
Created Dec 13, 2014
LaunchAgent to start BeamOff on login
View com.company.launch_beamoff.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>Label</key>
<string>com.company.launch_beamoff</string>
<key>ProgramArguments</key>
<array>
<string>/Applications/beamoff.app/Contents/MacOS/beamoff</string>
</array>
@rtrouton
rtrouton / gist:11bc3f21f47e1a79d099
Last active Apr 9, 2020
Downloading the latest release of a project from GitHub
View gist:11bc3f21f47e1a79d099
#!/bin/bash
# How to set these variables:
#
# GitHub_Owner
# GitHub_Repo
#
# Example use:
#
# The Linde Group has repos on GitHub available
@rtrouton
rtrouton / gist:f92f263414aaeb946e54
Last active Mar 17, 2020
Install Xcode command line tools on 10.7.x - 10.10.x. Tested on 10.7.5, 10.8.5, 10.9.5 and 10.10.2.
View gist:f92f263414aaeb946e54
#!/bin/bash
# Installing the Xcode command line tools on 10.7.x or higher
osx_vers=$(sw_vers -productVersion | awk -F "." '{print $2}')
cmd_line_tools_temp_file="/tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress"
# Installing the latest Xcode command line tools on 10.9.x or higher
if [[ "$osx_vers" -ge 9 ]]; then
@rtrouton
rtrouton / gist:a01073797a6d7e1fff9a
Created Oct 10, 2014
Disable Apple iCloud and Diagnostic Pop-Ups
View gist:a01073797a6d7e1fff9a
#!/bin/bash
# Determine OS version
osvers=$(sw_vers -productVersion | awk -F. '{print $2}')
sw_vers=$(sw_vers -productVersion)
# Determine OS build number
sw_build=$(sw_vers -buildVersion)