Skip to content

Instantly share code, notes, and snippets.

@homebysix
homebysix / gist:07b50daa24a8aae11e0c
Last active August 29, 2015 14:06
bash_version.sh
#!/bin/bash
###
#
# Name: bash_version.sh
# Description: Casper extension attribute that returns the installed
# version of /bin/bash.
# Author: Elliot Jordan <elliot@lindegroup.com>
# Created: 2014-09-25
# Last Modified: 2014-09-25
@homebysix
homebysix / iworm_check.sh
Created October 3, 2014 18:04
iworm_check.sh
#!/bin/bash
###
#
# Name: iworm_check.sh
# Description: Casper extension attribute that checks whether iWorm is
# detected.
# Author: Elliot Jordan <elliot@lindegroup.com>
# Created: 2014-10-03
# Last Modified: 2014-10-03
@homebysix
homebysix / git_version.sh
Last active March 18, 2019 17:44
Casper extension attribute that collects the version of Git installed.
#!/bin/sh
###
#
# Name: git_version.sh
# Description: Casper extension attribute that displays the version of Git.
# Excludes /usr/bin/git in order to prevent Xcode install prompt.
# Author: Elliot Jordan <elliot@elliotjordan.com>
# Created: 2014-12-19
# Last Modified: 2014-12-22
@homebysix
homebysix / gist:301a7a2e31b02ab7c45c
Last active August 29, 2015 14:15
echo_centered.sh
#!/bin/bash
# This function will echo text centered horizontally within the shell window.
echo_centered () {
# The character to be used as left/right filler.
if [[ -n "$2" ]]; then
FILLER="$2"
else
FILLER="="
@homebysix
homebysix / autopkg-test.sh
Last active August 29, 2015 14:16
autopkg-test.sh
/usr/bin/python /usr/local/bin/autopkg run --recipe-list ~/Library/Application\ Support/AutoPkgr/recipe_list.txt --report-plist /tmp/autopkg-test.xml
@homebysix
homebysix / ip_addresses.sh
Last active September 30, 2021 15:21
A Casper extension attribute that displays the active IP addresses of the Mac.
#!/bin/bash
###
#
# Name: ip_addresses.sh
# Description: A Casper extension attribute that displays the active IP
# addresses of the Mac.
# Author: Elliot Jordan <elliot@elliotjordan.com>
# Created: 2014-06-04
# Last Modified: 2015-03-18
@homebysix
homebysix / jamfHelper_help.txt
Last active November 25, 2020 23:06
jamfHelper_help.txt
JAMF Helper Help Page
Usage: jamfHelper -windowType [-windowPostion] [-title] [-heading] [-description] [-icon] [-button1] [-button2] [-defaultButton] [-cancelButton] [-showDelayOptions] [-alignDescription] [-alignHeading] [-alignCountdown] [-timeout] [-countdown] [-iconSize] [-lockHUD] [-startLaunchd] [-fullScreenIcon] [-kill]
-windowType [hud | utility | fs]
hud: creates an Apple "Heads Up Display" style window
utility: creates an Apple "Utility" style window
fs: creates a full screen window the restricts all user input
WARNING: Remote access must be used to unlock machines in this mode
@homebysix
homebysix / shard.sh
Last active February 1, 2021 23:44
shard.sh
#!/bin/bash
###
#
# Name: shard.sh
# Description: This Casper extension attribute takes a Mac serial
# number as input and uses that serial number to output a
# number from 0 to 9. This can be useful in scoping Casper
# policies to a specific percentage of the fleet.
# Author: Elliot Jordan <elliot@elliotjordan.com>
@homebysix
homebysix / send_imessage.sh
Last active April 28, 2020 22:40
send_imessage.sh
#!/bin/bash
RECIPIENT="+14155551212"
MESSAGE="Hello world"
cat << EOF > /tmp/send_imessage.scpt
tell application "Messages"
set serviceID to get id of first service
set theRecipient to buddy "${RECIPIENT}" of service id serviceID
send "${MESSAGE}" to theRecipient
@homebysix
homebysix / autopkg_run_recipe_list.sh
Created June 15, 2015 15:05
autopkg_run_recipe_list.sh
/usr/bin/python /usr/local/bin/autopkg run --recipe-list ~/Library/Application\ Support/AutoPkgr/recipe_list.txt --report-plist /tmp/autopkg-output.xml