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 / 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 / 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
@homebysix
homebysix / macit_twitter_search_terms.txt
Created July 13, 2015 20:37
MacIT Twitter search terms
(#MacIT2015) OR (#MacITconf) OR (@MacITconf) OR (#MacIT -NERMAC -NERİMAN -FATIHHARBIYE lang:en)
@homebysix
homebysix / show_unused_munki_packages.py
Last active August 29, 2015 14:26
show_unused_munki_packages.py
#!/usr/bin/env python
"""
Name: show_unused_munki_packages.py
Description: Given a path to a Munki repo, this script will tell you
which package names are unused in any manifests. Useful for
detecting things that were imported into Munki but never
added to a manifest.
Author: Elliot Jordan <elliot@lindegroup.com>
@homebysix
homebysix / EclipseIDE.download.recipe
Last active November 13, 2015 01:08
EclipseIDE.download.recipe
<?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>Description</key>
<string>Downloads the current release version of Eclipse.</string>
<key>Identifier</key>
<string>com.github.sheagcraig.download.EclipseIDE</string>
<key>Input</key>
<dict>
@homebysix
homebysix / email_report.html
Created March 10, 2016 22:46
email_report.html
<html>
<head>
<style>
* {
font-family: "Helvetica Neue", Helvetica, sans-serif;
font-size: 9pt;
line-height: 1.2em;
}
a {
@homebysix
homebysix / list_computer_groups.py
Created November 30, 2016 16:45
list_computer_groups.py
#!/usr/bin/python
import jss
# Connect to the JSS. (Requires python-jss to be configured.)
jss_prefs = jss.JSSPrefs()
j = jss.JSS(jss_prefs)
# Print computer groups.
print j.ComputerGroup()