Skip to content

Instantly share code, notes, and snippets.

View neilmartin83's full-sized avatar
🎯
Focusing

Neil Martin neilmartin83

🎯
Focusing
View GitHub Profile
<?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>com.neilmartin83.disable-squirrel-update-check</string>
<key>ProgramArguments</key>
<array>
<string>/bin/launchctl</string>
<string>setenv</string>
@erikng
erikng / 32bitapps.py
Last active April 16, 2018 11:46
32bitapps.py
#!/usr/bin/python
import subprocess
import plistlib
cmd = ['/usr/sbin/system_profiler', '-xml', 'SPApplicationsDataType']
proc = subprocess.Popen(cmd, shell=False, bufsize=-1, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
output, err = proc.communicate()
plist = plistlib.readPlistFromString(output)
items = plist[0]['_items']
for item in sorted(items, key=lambda x: x.get('path')):
@joshua-d-miller
joshua-d-miller / macOSLAPS-Utility
Last active October 3, 2018 13:05
Command Line utility to get LAPS passwords from AD for macOS
#!/usr/bin/python
'''Get LAPS password for AD Computers'''
# #################################################################
# This script will allow an admin user with
# the proper domain crednetials to get a LAPS
# password form Active Directory.
# ##################################################################
# Original script by barteardon
# https://github.com/bartreardon/macscripts/blob/master/lapssearch
# Updated script using pyObjC:
@poundbangbash
poundbangbash / gist:636c7098c7da21d6a8e5
Created May 22, 2015 03:37
Allow AD user to Remote Management
username=INSERTUSERNAMEHERE
# Check the username has been set
if [ $username = INSERTUSERNAMEHERE ]
then
echo You need to set the username
exit 1
fi
# Create the ARD Interact group which allows Control and Observe