Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am keeblers-n-bits on github.
  • I am kellyebler (https://keybase.io/kellyebler) on keybase.
  • I have a public key ASATJf7rbuceUZeY0SLkupeST0AZKoXNc1Fe3PZC5oySPAo

To claim this, I am signing this object:

@kellyebler
kellyebler / nuke-non-mdm-profiles.sh
Last active September 17, 2019 22:03
Finds out if we're enrolled in SimpleMDM and removes any profiles that are not installed by SimpleMDM if so.
#!/bin/bash
## find out if we're enrolled in SimpleMDM
mdmstatus=`/usr/bin/profiles status -type enrollment | grep MDM | /usr/bin/awk '{ print $3 }'`
if [ mdmstatus='Yes' ]
then
# Get a list of all profiles on computer that aren't 'unwiredmdm' and remove all of them
echo "MDM status is Yes. Removing profiles that aren't enforced by SimpleMDM"
@kellyebler
kellyebler / shame.sh
Created August 8, 2019 22:03
shame your users
#!/bin/bash
COUNTER=0
while [ $COUNTER -gt -1 ];
do
echo "Youve been shaming for $COUNTER seconds"
say shame
sleep 1
let COUNTER=COUNTER+1
done
@kellyebler
kellyebler / cold-storage.py
Created March 4, 2019 15:48
Finds Code42 users expiring in the same month. Runs as a cron job
#!/usr/local/bin/python3
# Import Modules
import os
import json
from datetime import datetime
import requests
from jinja2 import Environment, FileSystemLoader
import smtplib
@kellyebler
kellyebler / crashplancheck.sh
Created December 4, 2018 15:37
Jamf extension attribute script for checking hosts file for crashplan
#!/bin/bash
###
### This script is intended to look for the word crashplan in a users /etc/hosts file
### and report it to the JSS if there is something blocking CrashPlan from backing up
###
crashplan_check=`/usr/bin/grep -i crashplan /etc/hosts`
if [ "$crashplan_check" = "" ];then