Skip to content

Instantly share code, notes, and snippets.

Avatar

Mike Solin flammable

View GitHub Profile
View gist:d4bf7d873421d35ed560
#!/bin/bash
# enable our Mac SUS
defaults write /Library/Preferences/ManagedInstalls InstallAppleSoftwareUpdates -bool True
defaults write /Library/Preferences/ManagedInstalls SoftwareUpdateServerURL "http://sus.org/index_release.sucatalog"
# set our SUS for App Store updates, but disable update checking
defaults write /Library/Preferences/com.apple.SoftwareUpdate CatalogURL http://sus.org/index_release.sucatalog
View get_hostname.sh
#!/bin/bash
/usr/sbin/scutil --get ComputerName
/usr/sbin/scutil --get HostName
/usr/sbin/scutil --get LocalHostName
exit 0
View fix_hostname.sh
#!/bin/bash
HOSTN=`scutil --get LocalHostName`
scutil --set HostName "$HOSTN"
scutil --set ComputerName "$HOSTN"
exit
View Makefile
USE_PKGBUILD=1
include /usr/local/share/luggage/luggage.make
TITLE=kaseya_pkg
REVERSE_DOMAIN=com.yourcompany
PACKAGE_VERSION=7.0.0.4
PAYLOAD=\
l_tmp\
pack-kaseya_pkg\
pack-script-postinstall
View disable_screen_lock
<?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>PayloadIdentifier</key>
<string>edu.sju.profile.disable_screen_lock</string>
<key>PayloadRemovalDisallowed</key>
<false />
<key>PayloadScope</key>
<string>User</string>
View munki_install_user.sh
#!/bin/bash
if [[ -n $(/usr/bin/who | /usr/bin/awk '/console/ { print $1}') ]]; then
# Someone is logged in. Installation will proceed.
exit 0
else
# Nobody is logged in. Canceling installation.
exit 1
fi
View welcome_back.sh
#!/bin/bash
/usr/bin/osascript -e "set volume without output muted"
/usr/bin/osascript -e "set volume output volume 100"
/usr/bin/open -a Safari.app "https://www.youtube.com/watch?v=CGJd8FLAqRA"
exit 0
View dock_labs_generic.mobileconfig
<?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>PayloadIdentifier</key>
<string>edu.sju.dock_labs_generic</string>
<key>PayloadRemovalDisallowed</key>
<true />
<key>PayloadScope</key>
<string>User</string>
View disable_screen_lock.mobileconfig
<?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>PayloadIdentifier</key>
<string>edu.sju.profile.disable_screen_lock</string>
<key>PayloadRemovalDisallowed</key>
<true />
<key>PayloadScope</key>
<string>User</string>
View SPSS 23 Authorized-23.0.0.0.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>_metadata</key>
<dict>
<key>created_by</key>
<string>mike</string>
<key>creation_date</key>
<date>2015-06-26T20:52:21Z</date>