Skip to content

Instantly share code, notes, and snippets.

@jbaker10
jbaker10 / manifest_generator.py
Last active February 1, 2018 22:05
Using AirWatch API calls, get device information and make Munki manifests from that info
#!/usr/bin/python
import json
import subprocess
import sys
import os
import plistlib
import requests
@jbaker10
jbaker10 / power_users.sh
Last active June 27, 2017 15:17
Takes AD admin users and puts them in the Power Users group to perform certain functions
#!/bin/bash
#################################################################################
# #
# Script performs the following: #
# 1) Create Power User Group & add AD Standard Users #
# 2) Modify /etc/auth to give powerusers group specified rights #
# 3) Enforce Compliance # #
# AA Accounts are exempted # #
# Version 1.1, 2013-08-12 #
# Version 1.2, 2013-11-19 #
@jbaker10
jbaker10 / elk-zentral.txt
Created May 3, 2017 13:18
Setup ELK stack in Zentral
## To install Kibana
sudo docker pull sebp/elk:latest
## To run the link on your localhost just to test
docker run --link zentral_elastic_1:elasticsearch -p 127.0.0.1:5601:5601 --net zentral_default kibana
## After this, you should be able to access the Kibana dashboard from 127.0.0.1:5601
## Edit the base.json under conf/start/zentral/base.json
vi ./conf/start/zentral/base.json
#!/usr/bin/python
import os, subprocess, plistlib, re, sys
from os import listdir
from subprocess import PIPE
def isRoot():
if not os.geteuid() == 0:
print "\nRunning as standard account."
print "Re-launching script with sudo rights..."
#!/usr/bin/python
import logging
import time
import os
import sys
import syslog
import subprocess
from subprocess import Popen
import plistlib
#!/bin/bash
#
# Force Absolute Manage to install software at the login window.
declare -r AMSERVER="AM.nowhere.com"
declare -r AMDIR="/Library/Application Support/LANrev Agent"
declare -r AMAGENT="$AMDIR/LANrev Agent.app/Contents/MacOS/LANrev Agent"
declare -r LOGFILE="/var/log/gov.nih.nimh.onset.log"
@jbaker10
jbaker10 / lanrev_health_check.py
Last active July 25, 2016 23:42
lanrev_health_check
#!/usr/bin/python
""" This script will check the health of the LANrev
agent and run the planb binary if deemed necessary """
Copyright 2016 Jeremiah Baker.
# Licensed under the Apache License,
# Version 2.0 (the "License"); you may not
# use this file except in compliance with
# the License.
@jbaker10
jbaker10 / EndNote.download.recipe
Created October 16, 2015 15:43
EndNote.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 EndNote.</string>
<key>Identifier</key>
<string>com.github.jbaker10.download.EndNote</string>
<key>Input</key>
<dict>
@jbaker10
jbaker10 / gist:12f2b5fe01d3d7d4eb64
Created July 17, 2015 15:31
Created with mcxToProfile
<?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>PayloadContent</key>
<array>
<dict>
<key>PayloadContent</key>
<dict>
<key>gov.nih.NIHApp/key>