This file contains hidden or 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/env python | |
# -*- coding: utf-8 -*- | |
""" | |
Jamf Pro - Determine Execution Environment | |
""" | |
import os | |
def is_running_directly(): | |
""" |
This file contains hidden or 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 | |
import os | |
import pwd | |
from Foundation import CFPreferencesAppSynchronize | |
from Foundation import CFPreferencesSetValue | |
from Foundation import kCFPreferencesCurrentUser | |
from Foundation import kCFPreferencesCurrentHost |
This file contains hidden or 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 | |
# Scan and Remove False Google Docs Tokens | |
# Assumes GAM is installed. Change the path if you need to. | |
###################################[ VARIABLE DEFINITIONS ]################################## | |
#set -x | |
runINT="3600" #seconds | |
runDATE=$(date +%d-%m-%Y-%H-%M) |
This file contains hidden or 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
# encoding: utf-8 | |
import subprocess | |
def run_jamf_policy(p): | |
"""Runs a jamf policy by id or event name""" | |
cmd = ['/usr/local/bin/jamf', 'policy'] | |
if isinstance(p, basestring): |
This file contains hidden or 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 | |
# | |
# Script: Safely Close Application | |
# | |
# Description: | |
# Safely closes and application after alerting user and prompting to save | |
# any unsaved documents (if applicable). | |
# | |
# Parameters: | |
# - app_name: Name of the application |
This file contains hidden or 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 | |
### | |
# | |
# Name: clear-saved-printer-passwords.sh | |
# Description: Removes keychain entries in the logged-in-user's login keychain | |
# related to campus print servers. Useful after password changes. | |
# Author: Matthew Warren <[email protected]> | |
# Created: 2015-08-15 | |
# Last Modified: 2017-02-11 |
This file contains hidden or 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/sh | |
# Quit apps command | |
read -r -d '' OSASCRIPT_COMMAND <<EOD | |
set white_list to {"Finder"} | |
tell application "Finder" | |
set process_list to the name of every process whose visible is true | |
end tell | |
repeat with i from 1 to (number of items in process_list) | |
set this_process to item i of the process_list |
This file contains hidden or 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 | |
##################################### | |
# | |
# Keychain Repair | |
# | |
# Removes a User's login keychain, creates a new login keychain, sets it | |
# as the default keychain, deletes any Local Items keychain folders, | |
# then reboots the system interactively | |
# | |
# University of North Carolina Asheville ITS |
This file contains hidden or 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
<?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>AutoOpenSafeDownloads</key> | |
<false/> | |
<key>DomainsToNeverSetUp</key> | |
<array> | |
<string>aol.com</string> | |
<string>facebook.com</string> |
This file contains hidden or 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
<PrinterDefinitions> | |
<Printer> | |
<Name>Example Printer</Name> | |
<Server>print.org.edu</Server> | |
<ShareName>ExamplePrinter</ShareName> | |
<SMBURI>smb://print.org.edu/ExamplePrinter</SMBURI> | |
<LPDURI>lpd://print.org.edu/ExamplePrinter</LPDURI> | |
<Location>Lobby</Location> | |
<Option>option_one=value</Option> | |
<Option>second_opt=something</Option> |