Skip to content

Instantly share code, notes, and snippets.

View patgmac's full-sized avatar

Patrick Gallagher patgmac

  • Atlanta, GA
  • 00:46 (UTC -05:00)
View GitHub Profile
@PicoMitchell
PicoMitchell / get_compatible_macos_versions-asls.sh
Last active May 22, 2024 02:49
Scripts to get compatible macOS versions from Apple Software Lookup Service (gdmf.apple.com/v2/pmv) or Software Update Catalog (swscan.apple.com[...]sucatalog).
#!/bin/bash
#
# Created by Pico Mitchell (of Random Applications) on 1/5/23
#
# https://gist.github.com/PicoMitchell/877b645b113c9a5db95248ed1d496243#file-get_compatible_macos_versions-asls-sh
#
# MIT License
#
# Copyright (c) 2023 Pico Mitchell (Random Applications)
@talkingmoose
talkingmoose / Match Version Number or Higher.bash
Last active October 23, 2024 18:50
Generates a regular expression (regex) that matches the provided version number or higher. Useful for Jamf Pro's "matches regex" operator in searches and smart groups where the results need to be the current version of an app or higher.
#!/bin/bash
<<ABOUT_THIS_SCRIPT
-------------------------------------------------------------------------------
Written by:William Smith
Professional Services Engineer
Jamf
[email protected]
https://gist.github.com/2cf20236e665fcd7ec41311d50c89c0e
#!/usr/bin/python
# Credit to frogor for the objc
from Foundation import NSBundle
import json
import objc
import os
import plistlib
import subprocess
<key>installer_choices_xml</key>
<array>
<dict>
<key>attributeSetting</key>
<integer>1</integer>
<key>choiceAttribute</key>
<string>selected</string>
<key>choiceIdentifier</key>
<string>com.avid.pkg.sibelius.app</string>
</dict>
@opragel
opragel / ea_microsoft_outlook2016_versioncheck.py
Last active November 8, 2016 03:16
ea_microsoft_outlook2016_versioncheck.py
#!/usr/bin/python
"""
This script checks whether the installed version of Microsoft Outlook 2016 is
equal, less, or more than the target version defined by APP_TARGET_VERSION
and reports the result in Casper Suite extension attribute style.
T = Local app version is equal to provided target version
N = Local app version is newer than provided target version
F = Local app version is less than provided target version
N/A = Local app plist was not found or accesible at specified path
"""
@jbaker10
jbaker10 / lanrev_health_check.py
Last active July 25, 2016 23:42
lanrev_health_check
#!/usr/bin/python
""" This script will check the health of the LANrev
agent and run the planb binary if deemed necessary """
Copyright 2016 Jeremiah Baker.
# Licensed under the Apache License,
# Version 2.0 (the "License"); you may not
# use this file except in compliance with
# the License.
@opragel
opragel / laziest_install_microsoft_office2016.sh
Last active June 25, 2024 22:33
laziest_install_microsoft_office2016.sh
#!/bin/bash
# witness the horror
# seriously don't do this
# last warning.. maybe
# Guess I'm putting a license in
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and limitations under the License.
@kitzy
kitzy / deleteMacKeeper.sh
Created February 9, 2015 21:58
Delete MacKeeper and JustCloud
#!/bin/bash
# This program will uninstall MacKeeper and JustCloud
#################
### Variables ###
#################
# Items at the system level to be removed
systemItems=(
@MagerValp
MagerValp / kickstartam.sh
Created November 27, 2014 14:10
Force Absolute Manage agent to install packages without delay.
#!/bin/bash
#
# Force Absolute Manage to install software at the login window.
declare -r AMSERVER="your.amserver.example"
declare -r AMDIR="/Library/Application Support/LANrev Agent"
declare -r AMAGENT="$AMDIR/LANrev Agent.app/Contents/MacOS/LANrev Agent"
declare -r LOGFILE="/var/log/kickstartam.log"
@gregneagle
gregneagle / gist:6957826
Last active July 24, 2024 09:28
Using PyObjC and NSWorkspace to set the desktop picture. I am such a hypocrite!
#!/usr/bin/python
'''Uses Cocoa classes via PyObjC to set a random desktop picture on all screens.
Tested on Mountain Lion and Mavericks.
See:
https://developer.apple.com/library/mac/documentation/cocoa/reference/applicationkit/classes/NSWorkspace_Class/Reference/Reference.html
https://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSURL_Class/Reference/Reference.html