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 | |
################################################# | |
# Date: 05.12.23 | |
# | |
# version 1.0 | |
# Written by: Rob Potvin | Senior Consulting Engineer | Jamf | |
# | |
# DESCRIPTION | |
# Enable or Disable macOS Onboarding within the currenly logged in user. | |
# |
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 | |
#great little script to just use system icons for scripts | |
ICNS="/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/Sync.icns" | |
LOGO="/private/tmp/logo.png" | |
convertlogo=$(sips -z 512 512 -s format png ${ICNS} --out ${LOGO}) |
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
# Stolen from here: http://stackoverflow.com/a/20703594/850326 | |
#!/bin/sh | |
export POSIXLY_CORRECT=1 | |
if [ -z "${1}" -o -z "${2}" ] | |
then | |
echo "Usage: ${0} <name> <original-png-location>" | |
fi | |
name=$1 |
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 | |
# concept from http://stackoverflow.com/a/3403786/267224 | |
############# | |
# log to file | |
LOGFILE=/home/user/log/script.log | |
exec > >(tee -a $LOGFILE) | |
exec 2>&1 | |
############ |
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
on replace_chars(this_text, search_string, replacement_string) | |
set AppleScript's text item delimiters to the search_string | |
set the item_list to every text item of this_text | |
set AppleScript's text item delimiters to the replacement_string | |
set this_text to the item_list as string | |
set AppleScript's text item delimiters to "" | |
return this_text | |
end replace_chars | |
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 -ex | |
# Mount disk image on temp space | |
mountpoint=`hdiutil attach -mountrandom /tmp -nobrowse googlechrome.dmg | awk '/private\/tmp/ { print $3 } '` | |
echo Mounted on $mountpoint | |
# Determine version number | |
version=`defaults read "$mountpoint/Google Chrome.app/Contents/Info.plist" CFBundleShortVersionString` | |
echo Google Chrome version $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
<?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>10</key> | |
<dict> | |
<key>AVAlert</key> | |
<dict> | |
<key>Checkbox</key> | |
<array> |
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 | |
hdiutil attach -nobrowse -noverify /tmp/RecoveryHDUpdate.dmg | |
hdiutil attach -nobrowse -noverify /Volumes/RecoveryHDUpdate/RecoveryHDUpdate.pkg/RecoveryHDMeta.dmg | |
/tmp/RecoveryHDUpdate/RecoveryHDUpdate.pkg/Scripts/Tools/dmtest ensureRecoveryPartition / /Volumes/Recovery\ HD\ Update/BaseSystem.dmg 0 0 /Volumes/Recovery\ HD\ Update/BaseSystem.chunklist | |
hdiutil eject /Volumes/Recovery\ HD\ Update | |
hdiutil eject /Volumes/RecoveryHDUpdate |
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 Computer//DTD PLIST 1.0//EN" \ | |
"http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<!-- Contains a unique string that identifies your daemon to launchd. | |
This key is required. --> | |
<key>Label</key> | |
<string>com.gocongress.backup</string> |
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>Label</key> | |
<string>com.mycompanyname.mydepartment.mytaskname</string> | |
<key>ProgramArguments</key> | |
<array> | |
<string>/Users/myuser/Dashboard/mytask.sh</string> | |
</array> |
NewerOlder