Skip to content

Instantly share code, notes, and snippets.

Avatar

Rick Heil rickheil

View GitHub Profile
View slack-no-auto-updates.mobileconfig
<?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>com.tinyspeck.slackmacgap</key>
View groups.py
#!/usr/bin/python
import csv
import re
input_file = csv.DictReader(open("GroupsReport-cleaned.csv"))
for row in input_file:
clean_members = ""
# appriver gives us PSV with other garbage so we need to clean it up
dirty_members = row["Members"].split("|")
View Remove_Outdated_JDKs.plist
<?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>autoremove</key>
<false/>
<key>catalogs</key>
<array>
<string>testing</string>
</array>
View mdm_status.py
#!/usr/bin/python
"""
MDM status reporting tool. Requires macOS 10.13.4+ for command output compatibility.
"""
import subprocess
import os
import plistlib
import sys
View mdm_status.py
#!/usr/bin/python
"""
MDM status reporting tool. Requires macOS 10.13.4+ for command output compatibility.
"""
import subprocess
import os
import plistlib
import sys
View com.rickheil.disable-slack-auto-updates
<?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>Label</key>
<string>com.rickheil.disable-slack-auto-updates</string>
<key>ProgramArguments</key>
<array>
<string>/bin/launchctl</string>
<string>setenv</string>
View gist:41eb811b7530be5d09a0024a72f43763
cat /Applications/Slack.app/Contents/Resources/app.asar | grep --text -C 6 SLACK_NO_AUTO_UPDATES
const reasons: Array<string> = [];
if (getSetting<boolean>(store, 'isDevMode')) reasons.push('Developer build');
if (process.mas) reasons.push('Mac App Store build');
if (process.windowsStore) reasons.push('Windows Store build');
if (process.platform === 'linux') reasons.push('using Linux');
if (process.env.SLACK_NO_AUTO_UPDATES) reasons.push('updates disabled in environment');
const tempDirectory = process.env.TMPDIR || process.env.TEMP || '/tmp';
View uptime-robot-adder.py
#!/usr/bin/python
import requests
import sys
import csv
import urllib
API_KEY = ""
ENDPOINT_URL = "https://api.uptimerobot.com/v2/newMonitor"
HEADERS = {
View uptime-robot.json
{"to_number": "+1YOURPHONEHERE", "monitorURL": "*monitorURL*", "monitorFriendlyName": "*monitorFriendlyName*", "alertDetails": "*alertDetails*", "alertType": "*alertType*"}
View test.json
{
"to_number": "+1YOURPHONENUMBER",
"monitorURL": "https://rickheil.com",
"monitorFriendlyName": "Rick Heil Blog",
"alertDetails": "Keyword not found",
"alertType": "1"
}
You can’t perform that action at this time.