Skip to content

Instantly share code, notes, and snippets.

View nmcspadden's full-sized avatar

Nick McSpadden nmcspadden

View GitHub Profile
@nmcspadden
nmcspadden / gist:5091486
Last active December 14, 2015 13:09
AddWifi LaunchAgent.plist - the startup launchd item for the AddWifi script.
<?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>org.sacredsf.wifi.plist</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/libexec/add_wifi.sh</string>
</array>
@nmcspadden
nmcspadden / AddWifi.sh
Last active July 31, 2019 18:55
AddWifi.sh - joins a wifi network at the login window.
#!/bin/sh
# Set paths to our utilities
networksetup=/usr/sbin/networksetup
airport=/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport
# Determines which OS the script is running on
osvers=$(sw_vers -productVersion | awk -F. '{print $2}')
# On 10.7 and higher, the Wi-Fi interface needs to be identified.
@nmcspadden
nmcspadden / gist:5162560
Created March 14, 2013 15:58
Adobe CreativeSuite 5 repackage pkginfo
<?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>RestartAction</key>
<string>RequireRestart</string>
<key>autoremove</key>
<false/>
<key>catalogs</key>
<array>
@nmcspadden
nmcspadden / gist:5162585
Created March 14, 2013 16:00
Adobe Creative Suite 6 pkginfo, generated with AAMEE 3.1
<?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>AdobeSetupType</key>
<string>ProductInstall</string>
<key>adobe_install_info</key>
<dict>
<key>media_signature</key>
<string>{D8C642B6-A719-4234-8039-2654ED436D2A}</string>
@nmcspadden
nmcspadden / ARD installcheck_script
Last active December 15, 2015 00:28
ARD installcheck_script to make sure Admin is among the list of ARD users, but not everyone is.
#!/bin/sh
# Determines if the Remote Management settings are set
# for "All Users" or for "Only these users:" in System
# Preferences' Sharing preference pane
ARD_ALL_LOCAL=`/usr/bin/defaults read /Library/Preferences/com.apple.RemoteManagement ARD_AllLocalUsers`
# Lists all local user accounts on the Mac with a UID
# of greater or equal to 500 and less than 1024. This
/*global SpreadsheetApp: false, UiApp: false */
// Close the current UI
function exit() {
"use strict";
var ui = UiApp.getActiveApplication();
return ui.close();
}
// Callback action for button labelled "Generate Report"
osascript <<EndOfMyScript
set logInUser to "name"
set logInPassword to "password"
tell application "System Events"
tell application process "loginwindow"
key code 53
delay 1
key code 125
delay 1
key code 36 using option down
@nmcspadden
nmcspadden / Java7Update21.pkginfo
Last active December 16, 2015 07:29
Java 7 Update 21 pkginfo
<?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>autoremove</key>
<false/>
<key>catalogs</key>
<array>
<string>testing</string>
</array>
/*global SpreadsheetApp: false, UiApp: false */
// Close the current UI
function exit() {
"use strict";
var ui = UiApp.getActiveApplication();
return ui.close();
}
// Callback action for button labelled "Generate Report"
@nmcspadden
nmcspadden / ARD kickstart
Created May 8, 2013 15:58
Kickstarts ARD for admin user
#!/bin/sh
/System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -configure -allowAccessFor -specifiedUsers
/System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate -configure -access -on -users "admin" -privs -all -restart -agent