Skip to content

Instantly share code, notes, and snippets.

View neilmartin83's full-sized avatar
🎯
Focusing

Neil Martin neilmartin83

🎯
Focusing
View GitHub Profile
#!/bin/sh
## postinstall
/usr/bin/defaults write $3/Library/Preferences/com.airmusictech.Boom Content -string "/Applications/AIR Music Technology/Boom"
/usr/bin/defaults write $3/Library/Preferences/com.airmusictech.Mini\ Grand Content -string "/Applications/AIR Music Technology/Mini Grand"
/usr/bin/defaults write $3/Library/Preferences/com.airmusictech.Xpand\!2 Content -string "/Applications/AIR Music Technology/Xpand!2"
/bin/chmod 644 $3/Library/Preferences/com.airmusictech.Boom.plist
/bin/chmod 644 $3/Library/Preferences/com.airmusictech.Mini\ Grand.plist
/bin/chmod 644 $3/Library/Preferences/com.airmusictech.Xpand\!2.plist
#!/bin/sh
## postinstall
# This script is for Pro Tools 11.3 - it performs functions that would normally ask for admin privileges when Pro Tools is launched for the first time.
# It checks that Pro Tools has already been installed and will not run if it hasn't.
if [[ -d "$3/Applications/Pro Tools.app" ]]; then
echo "Pro Tools has been installed, running post-install tasks…"
# Let's declare a couple of variables because the author is lazy
#!/bin/sh
## preinstall
if [[ -d "$3/Applications/Pro Tools.app" ]]; then
echo "Pro Tools has been previously installed, removing before installation…"
/bin/rm -rf "$3/Applications/Pro Tools.app"
else
echo "Pro Tools has not been previously installed, proceeding with installation…"
fi
@neilmartin83
neilmartin83 / Casper Self Service script - Set Colour Profile for all users
Last active August 29, 2015 14:22
Casper Self Service script - Set Colour Profile for all users
#!/bin/bash
cp /Users/$3/Library/ColorSync/Profiles/EIZO.icc /Library/UEL/Config/
/Library/UEL/Tools/customdisplayprofiles set -d 1 --user-scope any /Library/UEL/Config/EIZO.icc
exit 0
#!/bin/bash
#Script to prevent login of users
#As of OS X 10.9 MCX- and profile-based methods for this do not seem to be working
#Code borrowed from https://jamfnation.jamfsoftware.com/discussion.html?id=4591
#Exclude authorised users and groups in the policy scope
user=$USER #Use existing Casper variable for user
heading=$'You are not authorised to use this facility.'
description=$'This is a specialist facility available only to selected students and staff within ADI.'
#!/bin/bash
message=$4
"/Library/Application Support/JAMF/bin/jamfHelper.app/Contents/MacOS/jamfHelper" -windowType fs -heading "$message" -icon /Library/UEL/lock-icon-512.png -launchd &
exit 0
#!/bin/bash
"/Library/Application Support/JAMF/bin/jamfHelper.app/Contents/MacOS/jamfHelper" -kill
exit 0
#!/bin/bash
killall cfprefsd
rm -Rfd /Library/Managed\ Preferences
dscl . -mcxdelete /Computers/localhost
dscl . -mcxdelete /Users/$3
jamf manage
jamf mcx
#!/bin/bash
du -h -s /Users/*
#!/bin/bash
#Replace "username" and "password" with credentials of the user you wish to log in
osascript -e 'tell application "SecurityAgent" to activate'; \
osascript -e 'tell application "Bluetooth Setup Assistant" to quit'; \
osascript -e 'tell application "System Events" to keystroke "username"'; \
osascript -e 'tell application "System Events" to keystroke tab'; \
osascript -e 'tell application "System Events" to delay 0.5'; \
osascript -e 'tell application "System Events" to keystroke "password"'; \
osascript -e 'tell application "System Events" to delay 0.5'; \