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
## MacAdmins Community | |
https://aus.social/@bartreardon | |
https://aus.social/@honestpuck | |
https://chaos.social/@fridomac | |
https://datboi.network/@jc0b | |
https://floss.social/@rustymyers | |
https://fosstodon.org/@gray | |
https://fosstodon.org/@jaharmi | |
https://fosstodon.org/@MScottBlake | |
https://furry.engineer/@rabbitt |
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 | |
export PATH=/usr/bin:/bin:/usr/sbin:/sbin | |
#################################################################################################### | |
# License information | |
#################################################################################################### | |
# | |
# Copyright (c) 2024, JAMF Software, LLC. All rights reserved. | |
# |
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 | |
# this script will return the current default application for a url scheme | |
# for use as a Jamf Extension attribute | |
# by Armin Briegel - Scripting OS X | |
# Permission is granted to use this code in any way you want. | |
# Credit would be nice, but not obligatory. | |
# Provided "as is", without warranty of any kind, express or implied. |
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
import Foundation | |
let process = Process() | |
process.launchPath = "/usr/bin/say" | |
process.arguments = ["-v", "?"] | |
let outPipe = Pipe() | |
process.standardOutput = outPipe | |
process.terminationHandler = { process in | |
let outData = outPipe.fileHandleForReading.readDataToEndOfFile() | |
let output = String(data: outData, encoding: .utf8) ?? "" |
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/sh | |
export PATH=/usr/bin:/bin:/usr/sbin:/sbin | |
xcodePath="/Applications/Xcode.app" | |
if [ ! -e "$xcodePath" ]; then | |
echo "no app at $xcodePath, exiting..." | |
exit 1 | |
fi |
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
<?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>PayloadContent</key> | |
<array> | |
<dict> | |
<key>PayloadContent</key> | |
<dict> | |
<key>com.scriptingosx.ChooserUI</key> |
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
# Developer ID Installer cert name | |
sign_cert="Developer ID Installer: Name (ABCD123456)" | |
# profile name used with `notarytool --store-credentials` | |
credential_profile="notary-example.com" | |
# data from build settings | |
pkg_name="$PRODUCT_NAME" | |
identifier="$PRODUCT_BUNDLE_IDENTIFIER" | |
version="$MARKETING_VERSION" |
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/sh | |
# template script for running a command as user | |
# The presumption is that this script will be executed as root from a launch daemon | |
# or from some management agent. To execute a single command as the current user | |
# you can use the `runAsUser` function below. | |
# by Armin Briegel - Scripting OS X | |
# |
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/zsh | |
# pkgAndNotarize.sh | |
# 2019 - Armin Briegel - Scripting OS X | |
# place a copy of this script in in the project folder | |
# when run it will build for installation, | |
# create a pkg from the product, | |
# upload the pkg for notarization and monitor the notarization status |
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
# PROMPT | |
# default macOS prompt is: \h:\W \u\$ | |
# assemble the prompt string PS1 | |
# inspired from: https://stackoverflow.com/a/16715681 | |
function __build_prompt { | |
local EXIT="$?" # store current exit code | |
# define some colors |
NewerOlder