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
nmcspadden / AddWifi.sh
Last active Jul 31, 2019
AddWifi.sh - joins a wifi network at the login window.
View AddWifi.sh
#!/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.
View mad_wizard_deekin_familiars.vbs
;LEVEL DETECTOR GEM FARM
;This script is designed to farm gems and boss chest drops by automatically progressing through low level areas, then resetting and starting over the same mission
;It achieves this by levelling click damage and clicking automatically to kill enemies as fast as possible. To ensure the fastest boss kills, and to pick up
;item drops, it utilizes a pixel-color detector to determine when the game is changing levels. This allows it to know when it is 'safe' to level champions
;or click damage without missing anything, and allows it to click in the right place to pick up items as they drop and to open the boss loot bag as soon
;as it reaches the middle of the screen. Overall this allows for a sub 11 minute run, with no down time; the script resets as soon as it reaches area 31.
;Settings: Set your adventure map to show all, including completed adventures (though the script should handle this). Set level up mode to UPG (though the script should handle this),
;turn on autoprogress (though the
@nmcspadden
nmcspadden / SignProfiles.sh
Last active Mar 3, 2018
Signs a folder full of profiles
View SignProfiles.sh
#!/bin/bash
for profile in Profiles/*.mobileconfig
do
s=${profile##*/}
outName=${s%.*}
outName+="Signed.mobileconfig"
/usr/bin/security cms -S -N "Mac Developer Application" -i $profile -o "$outName"
done
View xcode_results_9.2.txt
autopkg run -vvv Xcode.munki -p ~/Downloads/xcode_9.2.xip
Processing Xcode.munki...
...
PackageRequired
{'Input': {}}
{'Output': {}}
XcodeXIPUnpacker
{'Input': {'PKG': '/Users/nmcspadden/Downloads/xcode_9.2.xip'}}
XcodeXIPUnpacker: Xar unpacking /Users/nmcspadden/Downloads/xcode_9.2.xip
XcodeXIPUnpacker:
View xcode_results_9.3b2.txt
$ autopkg run -vvv Xcode.munki -p ~/Downloads/Xcode_9.3_beta_2.xip
Processing Xcode.munki...
...
PackageRequired
{'Input': {}}
{'Output': {}}
XcodeXIPUnpacker
{'Input': {'PKG': '/Users/nmcspadden/Downloads/Xcode_9.3_beta_2.xip'}}
XcodeXIPUnpacker: Xar unpacking /Users/nmcspadden/Downloads/Xcode_9.3_beta_2.xip
XcodeXIPUnpacker:
@nmcspadden
nmcspadden / bash_output
Last active Nov 28, 2017
Testing named vs. unnamed loggers
View bash_output
$ python named_logger.py
WARNING:root:warning
ERROR:root:error
CRITICAL:root:critical
Hi.
$ python unnamed_logger.py
2017-11-28 08:05:40 INFO: Writing verbose debug log to: /var/folders/th/3tqg05g54f73x0k_mstm5wy1_0g_xw/T/mm.XcXk7B.log
2017-11-28 08:05:40 INFO: info
2017-11-28 08:05:40 WARNING: warning
2017-11-28 08:05:40 ERROR: error
@nmcspadden
nmcspadden / ARD kickstart
Created May 8, 2013
Kickstarts ARD for admin user
View ARD kickstart
#!/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
View date_verification.py
#!/usr/bin/python
"""Verify the date because Apple can't."""
import datetime
import shell_tools
import sys_tools
current_year = int(datetime.datetime.now().year)
sys_tools.log('CPE-date_verification', 'Year is: %s' % current_year)
View Xerox WC 7556
#!/bin/sh
# Variables. Edit these.
printername="shhs_gabrielle".sacredsf.org
location="SHHS Gabrielle"
gui_display_name=$location
address=$printername
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.
option_1="XRLanFax=False"
@nmcspadden
nmcspadden / swuprun.sh
Created Dec 3, 2016 — forked from MagerValp/swuprun.sh
Start a linked clone of a VM and list available software updates.
View swuprun.sh
#!/bin/bash
#
# Start a linked clone of a VM and list available software updates.
declare -r FUSION_PATH="/Applications/VMware Fusion.app"
declare -r GUEST_USER="swup"
declare -r GUEST_PASSWORD="swup"
# Exit status constants.
You can’t perform that action at this time.