Skip to content

Instantly share code, notes, and snippets.

View gilburns's full-sized avatar

Gil Burns gilburns

View GitHub Profile
@smithjw
smithjw / install_xcode_xip.sh
Created May 20, 2022 00:05
Install Xcode xip from Self Service
#!/bin/bash
XCODE_VERSION="$4"
XCODE_TRIGGER="$5"
XCODE_NAME="Xcode-${XCODE_VERSION}"
XCODE_XIP_CACHE="/Library/Application Support/JAMF/Waiting Room/${XCODE_NAME}.xip.pkg"
XCODE_XIP_PATH="/Library/Management/${XCODE_NAME}.xip"
UNXIP="/Library/Management/Tools/unxip"
LOG_FOLDER="/private/var/log"
#!/usr/bin/env bash
CLIENT_ID="_FALCON_API_CLIENT_ID_"
CLIENT_SECRET="FALCON_API_CLIENT_SECRET_"
CID="_FALCON_CID_"
TOKEN="_FALCON_INSTALL_TOKEN"
API_HOST="api.eu-1.crowdstrike.com"
function main() {
@Cosmo
Cosmo / Microsoft-Teams-GPU-Fixer.sh
Last active August 11, 2022 00:25
Disable GPU usage for Microsoft Teams
APP=TeamsFixer
mkdir -vp ${APP}.app/Contents/MacOS ${APP}.app/Contents/Resources
PATH="$PATH:/usr/libexec"
printf '#!/usr/bin/env bash\nexec /Applications/Microsoft\ Teams.app/Contents/MacOS/Teams --disable-gpu' > ${APP}.app/Contents/MacOS/${APP}
chmod +x ${APP}.app/Contents/MacOS/${APP}
cp /Applications/Microsoft\ Teams.app/Contents/Resources/icon.icns ${APP}.app/Contents/Resources/icon.icns
PlistBuddy ${APP}.app/Contents/Info.plist -c "add CFBundleDisplayName string ${APP}"
PlistBuddy ${APP}.app/Contents/Info.plist -c "add CFBundleIconFile string icon.icns"
PlistBuddy ${APP}.app/Contents/version.plist -c "add ProjectName string ${APP}"
find ${APP}.app
@blakefrantz
blakefrantz / gatekeeper_status.sh
Created February 3, 2014 21:32
Determines the state of Gatekeeper on OSX 10.8 and 10.9. Differentiates between three modes: "Mac App Store", "Mac App Store and identified developers", and "Anywhere",
#!/bin/bash
#
# Determines the state of Gatekeeper on OSX 10.8 and 10.9. Differentiates between three modes:
#
# - Mac App Store
# - Mac App Store and identified developers
# - Anywhere
#
# DEV_REQ_[12] are certificate requirements stored in the SystemPolicy sqlite database.
# Each certificate requirement is disabled/enabled persuant to the 'disabled' field in