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 / Get Flash
Created Jul 17, 2013
Automunki Flash
View Get Flash
#!/bin/bash -ex
# download latest
ftp -o flash.dmg
# Mount disk image on temp space
mountpoint=`hdiutil attach -mountrandom /tmp -nobrowse flash.dmg | awk '/private\/tmp/ { print $3 } '`
echo Mounted on $mountpoint
View mcxToProfile crash
bash-3.2# ./ --dsobject /Local/MCX/computergroups/office2008 --identifier Office2008
Traceback (most recent call last):
File "./", line 450, in <module>
File "./", line 441, in main
mcx_data = getMCXData(options.dsobject)
File "./", line 304, in getMCXData
mcx_item_data = readPlistFromString(str(mcx_item))
File "./", line 229, in readPlistFromString
raise NSPropertyListSerializationException(error)
View Office2008 plist output
bash-3.2# dscl -plist /Local/MCX -read ComputerGroups/office2008 dsAttrTypeStandard:MCXSettings
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">
<string>3c3f786d 6c207665 7273696f 6e3d2231 2e302220 656e636f 64696e67 3d225554 462d3822 3f3e0a3c 21444f43 54595045 20706c69 73742050 55424c49 4320222d 2f2f4170 706c652f 2f445444 20504c49 53542031 2e302f2f 454e2220 22687474 703a2f2f 7777772e 6170706c 652e636f 6d2f4454 44732f50 726f7065 7274794c 6973742d 312e302e 64746422 3e0a3c70 6c697374 20766572 73696f6e 3d22312e 30223e0a 3c646963 743e0a09 3c6b6579 3e6d6378 5f617070 6c696361 74696f6e 5f646174 613c2f6b 65793e0a 093c6469 63743e0a 09093c6b 65793e4f 66666963 65504944 3c2f6b65 793e0a09 093c6469 63743e0a 0909093c 6b65793e 466f7263 65643c2f 6b65793e 0a090909 3c617272 61793e0a 09090909 3c646963 743e0a09 09090909 3c6b6579 3e6d6378 5f707265 66657265 6
View Xerox WC 7556
# Variables. Edit these.
location="SHHS Gabrielle"
driver_ppd="/Library/Printers/PPDs/Contents/Resources/Xerox WC 7556.gz"
# Populate these options if you want to set specific options for the printer. E.g. duplexing installed, etc.
View MCX Script
# This script sets up and configures LocalMCX
# this version 16 May 2012 Greg Neagle
# updated for Mountain Lion compatibility
# these GUIDs must match those referred to in the /ComputerGroups groupmembership
View MCX-Script postflight
launchctl load /Library/LaunchDaemons/org.sacredsf.mcx.plist
View MCX-Script LaunchDaemon
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">
View 10.8 Login
line_01='set logInUser to "USER"'
line_02='set logInPassword to "PASSWORD"'
line_03='tell application "System Events"'
line_04='tell application process "loginwindow"'
line_05='key code 53'
line_06='delay 1'
line_07='key code 125'
line_08='delay 1'
line_09='key code 36 using option down'
line_10='delay 1'
View ARD for "admin"
/System/Library/CoreServices/RemoteManagement/ -configure -allowAccessFor -specifiedUsers
/System/Library/CoreServices/RemoteManagement/ -activate -configure -access -on -users "admin" -privs -all -restart -agent
exit 0
open "$HOME/Library/Application Support/minecraftedu/startlauncher.jar"
exit 0
You can’t perform that action at this time.