Skip to content

Instantly share code, notes, and snippets.

#!/bin/zsh -eux
VERSION="$1" # ex. 24.002.20687
VERSION="${VERSION:gs/\./}" # ex. 2400220687
JAMF_UPLOAD_REPO="$HOME/src/github.com/grahampugh/jamf-upload"
JAMF_UPLOAD="${JAMF_UPLOAD_REPO}/jamf-upload.sh"
AUTOPKG_PREFS="$HOME/Library/Preferences/com.github.autopkg.plist"
test -n "${VIRTUAL_ENV}"
@jps3
jps3 / download.sh
Created April 12, 2024 16:09
Given a version string, download the update DMGs for Acrobat DC and Acrobat Reader DC, and extract *.pkg files
#!/bin/zsh -eux
VERSION="$1" # ex. 24.002.20687
VERSION="${VERSION:gs/\./}" # ex --> 2400220687
curl -LO "https://ardownload2.adobe.com/pub/adobe/reader/mac/AcrobatDC/${VERSION}/AcroRdrDCUpd${VERSION}_MUI.dmg"
curl -LO "https://ardownload2.adobe.com/pub/adobe/acrobat/mac/AcrobatDC/${VERSION}/AcrobatDCUpd${VERSION}.dmg"
ADBTMP="$(mktemp -d)";
@jps3
jps3 / jamf-settings-schema--techsmith-camtasia-2023.json
Created August 31, 2023 16:21
Jamf Custom Settings Schema for Techsmith Camtasia 2023 (and likely other versions)
{
"title": "",
"description": "",
"__version": "20230831.1205",
"__preferencedomain": "com.techsmith.camtasia2023",
"links": [
{
"rel": "Documentation Link",
"href": "https://support.techsmith.com/hc/en-us/articles/203727638-Enterprise-Install-Guidelines-For-Camtasia-on-macOS"
}
#!/usr/bin/env/python3
URL = "https://macadmins.psu.edu/conference/resources/"
LINK_TEXT = "Slides"
# ex. DOWNLOAD_PATH = "/Users/me/Documents/Sysadmin/Conferences/2023/PSU MacAdmins/Slides"
DOWNLOAD_PATH = ""
import os
import requests
import sys
@jps3
jps3 / postman-jamf-pro-api-helper.js
Last active April 5, 2023 18:09
Jamf Pro API auth bearer token validator and helper tests javascript
/*
* Jamf Pro API auth bearer token validator/helper
*
* Paste into:
* auth
* Create a token based on other authentication details (basic, etc.)
* Tests (tab)
*
* (Assumes you have an environment already set up with variables defined for
* baseUrl, basicAuthUsername, basicAuthPassword, and bearerToken)
@jps3
jps3 / apparmordesktopmac.jamf_custom_prefs_schema.json
Last active February 3, 2023 21:58
Quickie Jamf custom preferences JSON schema for Cutcom/AppArmor Desktop Notifications for Mac app
{
"title": "AppArmor Desktop Notifications Mac App (com.cutcom.apparmor.apparmordesktopmac)",
"description": "Setting(s) for AppArmor’s Desktop Notifications for Mac app.",
"properties": {
"ServerURL": {
"title": "AppArmor URL for your org",
"description": "(ex. https://myschool.apparmor.com)",
"property_order": 1,
"type": "string"
}
@jps3
jps3 / auto-login-user.sh
Last active May 17, 2022 18:39
Jamf Pro Computer Extension Attribute to perform cursory check for macOS auto login user enabled
#!/bin/bash
#
# Created by jps3@lehigh.edu on ? (History empty)
# Updated by jps3@lehigh.edu on 2022-05-17
#
# Jamf Pro Computer Extension Attribute to perform cursory check for macOS auto login user enabled
# https://gist.github.com/jps3/7777f263e0962db6423718b688db03d5
#
# Jamf Pro > Settings > Computer Management > Extension Attributes
# Display Name : auto-login-user
@jps3
jps3 / crowdstrike-falcon-sensor-version.sh
Created May 17, 2022 18:25
Jamf Pro Computer Extension Attribute to report version of CrowdStrike Falcon client
#!/bin/bash
#
# Created by jps3@lehigh.edu on 2020-?-? (History empty)
# Updated by jps3@lehigh.edu on 2022-05-17
#
# https://gist.github.com/jps3/4f4cadc7f00c6108a87a0865651b5fe7
#
# Jamf Pro > Settings > Computer Management > Extension Attributes
# Display Name : crowdstrike-falcon-sensor-version
# Description : Parses the output of the 'falconctl' command for the version string to report as a result.
@jps3
jps3 / firmwarepasswd-check.sh
Last active May 17, 2022 19:17
Jamf Pro Computer Extension Attribute for status of firmware password check
#!/bin/bash
#
# Created by jps3@lehigh.edu on 2021-08-22
#
# Jamf Pro > Settings > Computer Management > Extension Attributes
# Display Name : firmwarepasswd-check
# Description : Report result of firmware password check.
# Data Type : String
# Inventory Display : Hardware
# Input Type : Script
@jps3
jps3 / system-last-boot-timestamp-utc.sh
Created May 17, 2022 17:47
Jamf Pro Computer Extension Attribute for system’s last boot timestamp (UTC)
#!/bin/bash
#
# Created by jps3@lehigh.edu on 2022-05-17
#
# Jamf Pro > Settings > Computer Management > Extension Attributes
# Display Name : system-last-boot-timestamp-utc
# Description : Queries system for timestamp of last boot.
# Data Type : Date (YYYY-MM-DD hh:mm:ss)
# Inventory Display : Extension Attributes
# Input Type : Script