mkdir -p /opt/scripts
mkdir -p /var/log/custom
mkdir -p /var/root/Library/LaunchAgents
curl 'https://gist.githubusercontent.com/heywoodlh/0295135b9e24ec0729571497c9ab5a77/raw/b3032d9a563c956f574176c39cb2a5382f8c579c/auth-log.sh' -o /opt/scripts/auth-log.sh
chmod +x /opt/scripts/auth-log.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
## -----------------------------=[ WARNING ]=-------------------------------- ## | |
# | |
# This script is now woefully out of date due to which accounts ESXi allows to | |
# ssh into the box as well as sticky folders/file flags. | |
# I've since ported the whole thing to python with a lot of bells and whistles | |
# and if i get around to making it public, i'll put a link here. | |
# | |
## -------------------------------=[ Info ]=--------------------------------- ## |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/local/munki/munki-python | |
import plistlib, os.path, os, logging, pprint | |
# Based off of https://forums.developer.apple.com/message/6741 | |
# and http://apple.stackexchange.com/a/136976 | |
# Downloaded from https://gist.github.com/pudquick/349f063c242239952a2e | |
log_fmt = "[%(asctime)s] [%(levelname)-8s] %(message)s" | |
logging.basicConfig(format=log_fmt, level=logging.DEBUG) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/Code/autopkg b/Code/autopkg | |
index d0747bc..e9db986 100755 | |
--- a/Code/autopkg | |
+++ b/Code/autopkg | |
@@ -200,6 +200,7 @@ def find_recipe_by_name(name, search_dirs): | |
patterns = [ | |
os.path.join(normalized_dir, "%s.recipe" % name), | |
os.path.join(normalized_dir, "*/%s.recipe" % name), | |
+ os.path.join(normalized_dir, "*/*/%s.recipe" % name), | |
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# bash | |
product_version=$(sw_vers -productVersion) # 10.14.6 | |
os_vers=( ${product_version//./ } ) # ( 10 14 6 ) | |
os_vers_major="${os_vers[0]}" # 10 | |
os_vers_minor="${os_vers[1]}" # 14 | |
os_vers_patch="${os_vers[2]}" # 6 | |
os_vers_build=$(sw_vers -buildVersion) # 18G87 | |
echo "${os_vers_major}.${os_vers_minor}.${os_vers_patch}+${os_vers_build}" # 10.14.6+18G87 | |
# zsh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# As written, this requires the following: | |
# - OS X 10.6+ (tested on 10.12.6 and 10.14.3) | |
# - python 2.6 or 2.7 (for collections.namedtuple usage, should be fine as default python in 10.6 is 2.6) | |
# - pyObjC (as such, recommended to be used with native OS X python install) | |
# Run with root | |
import objc, ctypes.util, os.path, collections |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Replace with the username and password of an account that has access to your DeployStudio instances | |
python -c 'import base64; print "Authorization: Basic %s" % base64.b64encode("USERNAME:PASSWORD")' | |
# Authorization: Basic VVNFUk5BTUU6UEFTU1dPUkQ= | |
AUTH="Authorization: Basic VVNFUk5BTUU6UEFTU1dPUkQ=" | |
SERVER="https://localhost:60443" | |
# Grab the workflows (as a binary plist), convert them to XML, and dump to stdout | |
curl -sk -X GET \ | |
-H "${AUTH}" \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"releases": [ | |
{ | |
"productname": "autodesk-maya", | |
"producttitle": "Maya", | |
"name": "autodesk-maya-2014", | |
"title": "Maya 2014", | |
"productlinecode": "", | |
"productKey": "657F1", | |
"sku": "657F1-00Z1CC-100N", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MODEL="Xerox WorkCentre 6655" | |
ICON=$(gunzip -c "/Library/Printers/PPDs/Contents/Resources/${MODEL}.gz" | awk '/APPrinterIconPath/ {gsub(/"/,"",$2); print $2}') | |
/usr/bin/sips -s format png "${ICON}" --out "${MODEL}.png" --addIcon --resampleHeightWidthMax 512 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Configurations | |
Developer Tools | |
Drivers | |
Graphics & Design | |
Math & Science | |
Plugins | |
Printers | |
Productivity | |
Utilities |