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 | |
# It's your funeral | |
LINUX_TOMCAT_USER="tomcat7" | |
LINUX_TOMCAT_GROUP="tomcat7" | |
LINUX_SERVER_XML_PATH="/usr/local/jss/tomcat/conf/server.xml" | |
LINUX_SERVER_XML_BACKUP_PATH="/usr/local/jss/tomcat/conf/server.xml.bak" | |
MAC_TOMCAT_USER="_appserver" | |
MAC_TOMCAT_GROUP="_appserveradmin" | |
MAC_SERVER_XML_PATH="/Library/JSS/Tomcat/conf/server.xml" | |
MAC_SERVER_XML_BACKUP_PATH="/Library/JSS/Tomcat/conf/server.xml.bak" |
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/sh | |
#created By Dan De Rusha modified 10-8-14 | |
### DELETE UTC CACHES | |
rm -r /Library/Extensis | |
mkdir /Library/Extensis | |
chmod 777 /Library/Extensis | |
### DELETE MICROSOFT CACHES | |
rm /Users/*/Library/Preferences/Microsoft/Office\ Font\ Cache* | |
rm /Users/*/Library/Preferences/Microsoft/Office\ 2008/Office\ Font\ Cache* |
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
#!/usr/bin/env python | |
from __future__ import print_function | |
import json | |
import logging | |
from urllib2 import Request, urlopen, URLError, HTTPError | |
from base64 import b64decode |
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
''' | |
This is an example of how to send data to Slack webhooks in Python with the | |
requests module. | |
Detailed documentation of Slack Incoming Webhooks: | |
https://api.slack.com/incoming-webhooks | |
''' | |
import json | |
import requests |
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
#!/usr/bin/env bash | |
# Documentation | |
# https://docs.gitlab.com/ce/api/projects.html#list-projects | |
NAMESPACE="YOUR_NAMESPACE" | |
BASE_PATH="https://gitlab.example.com/" | |
PROJECT_SEARCH_PARAM="" | |
PROJECT_SELECTION="select(.namespace.name == \"$NAMESPACE\")" | |
PROJECT_PROJECTION="{ "path": .path, "git": .ssh_url_to_repo }" |
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 | |
set -e | |
usage() { | |
echo "Usage: $0 USERNAME" 2>&1 | |
exit 1 | |
} | |
username="$1" | |
[ -z "$username" ] && usage |
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
# An overly complicated SIP config checker | |
# This is a technically interesting implementation because it does not rely on csrutil | |
# Instead it queries the kernel directly for the current configuration status | |
# This means, for example, in environments where SIP has been disabled and csrutil has | |
# been removed or modified (say, with DYLD_LIBRARY_PATH), as long as python can run you | |
# can still check status | |
# Additionally, checking the nvram csr-active-config setting isn't accurate now with | |
# 10.12.2+, since running "sudo csrutil clear" deletes the variable until reboot, |
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
#!/usr/bin/python | |
import xml.etree.ElementTree as ET | |
import requests | |
import uuid | |
params = {'cup2hreq': 'foo', 'cup2key': 'bar'} | |
platform = 'mac' | |
os_version = '10.12' |
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
import getpass | |
import sys | |
import xml.etree.ElementTree as Et | |
import requests | |
try: | |
NEW_USERNAME = sys.argv[1] | |
except IndexError: | |
print('No username provided!') |
OlderNewer