Skip to content

Instantly share code, notes, and snippets.

View clburlison's full-sized avatar

Clayton Burlison clburlison

View GitHub Profile
@clburlison
clburlison / Office2016-MeContact.sh
Created January 16, 2016 13:39
Office2016-MeContact.sh -- This script sets the User Information fields for Office 2016. (user level permission)
# !/bin/bash
# PATH=/bin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/libexec
# Source - http://maclovin.org/blog-native/2015/office-2016-where-is-the-name-of-the-user-stored-
export PATH
FullScriptName=$(basename "$0") # Variable used to store the file name of this script
DsclSearchPath="/Local/Default" # Variable used to store the search path used by the dscl command.
# Get the username of the person currently running the script.
@clburlison
clburlison / office2016.xml
Last active March 6, 2018 03:34
Office 2016 Choice XML Example (this choice xml by default does not install Microsoft Autoupdate application) + Casper postinstall example. NOTE: Munki has a separate XML for copy/paste ability. https://clburlison.com/demystify-office2016
<?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">
<array>
<dict>
<key>attributeSetting</key>
<integer>1</integer>
<key>choiceAttribute</key>
<string>selected</string>
<key>choiceIdentifier</key>
@clburlison
clburlison / get_sys_info.scpt
Last active October 24, 2019 08:05
OS X Get Current Sys Info
# https://macadmins.slack.com/archives/general/p1449604450017318
set a to do shell script "defaults read /System/Library/CoreServices/XProtect.bundle/Contents/Resources/XProtect.meta.plist Version"
tell application "Finder" to set b to get creation date of (POSIX file "/System/Library/CoreServices/XProtect.bundle/Contents/Resources/XProtect.meta.plist" as alias)
set s to short date string of b
set t to time string of b
set c to do shell script "defaults read /private/var/db/gkopaque.bundle/Contents/version.plist CFBundleShortVersionString"
tell application "Finder" to set d to get creation date of (POSIX file "/private/var/db/gkopaque.bundle/Contents/version.plist" as alias)
set u to short date string of d
set v to time string of d
set e to do shell script "defaults read /System/Library/CoreServices/SystemVersion.plist ProductVersion"
@clburlison
clburlison / LaunchServices.sh
Created November 2, 2015 23:25
Rebuild the LaunchServices database
#!/bin/bash
/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain use
@clburlison
clburlison / MainController.py
Last active February 12, 2016 01:55
Imagr include_workflows from URL 98.5% finished. For @erikng never completed or implemented at this point.
# -*- coding: utf-8 -*-
#
# MainController.py
# Imagr
#
# Created by Graham Gilbert on 04/04/2015.
# Copyright (c) 2015 Graham Gilbert. All rights reserved.
#
import objc
@clburlison
clburlison / master.sh
Created October 31, 2015 01:43
Bash export example
#!/bin/bash
source ./slave.sh
echo $UPDATE
if [ $UPDATE == true ]; then
echo "update is true"
fi
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PayloadContent</key>
<array>
<dict>
<key>AutoLaunchedApplicationDictionary-managed</key>
<array>
<dict>
@clburlison
clburlison / AdobeAfterEffects2015.ccp.plist
Last active September 3, 2015 03:48
Adobe CC 2015 plists for aamporter
<?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>channels</key>
<array>
<string>AdobeAfterEffects-13.5.0-Trial</string>
<string>AdobeAfterEffectsCC2015LangPacken_US-13.5.0</string>
<string>AdobeAfterEffectsCC2015Presets-13.5.0</string>
<string>AdobeAfterEffectsCC2015Support-13.5.0</string>
@clburlison
clburlison / kickstart_ard_example.sh
Created August 27, 2015 23:53
kickstart_ard_example.sh
#!/bin/sh
# More details can be found in this post http://www.amsys.co.uk/2015/01/creating-first-boot-script/
ARD="/System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart"
# This turns the setting on
$ARD -configure -activate
$ARD -configure -access -on
# This remote settings for only authorized users
$ARD -configure -allowAccessFor -specifiedUsers
# replace localadmin with your admin account
@clburlison
clburlison / Makefile
Last active August 29, 2015 14:24
Munki Client Settings
include /usr/local/share/luggage/luggage.make
TITLE=MunkiClientSettings
REVERSE_DOMAIN=k12.bisd
PACKAGE_VERSION=1.0
PAYLOAD=\
pack-script-postinstall