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 | |
""" | |
MDM status reporting tool. Requires macOS 10.13.4+ for command output compatibility. | |
""" | |
import subprocess | |
import os | |
import plistlib | |
import sys |
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
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'; |
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 requests | |
import sys | |
import csv | |
import urllib | |
API_KEY = "" | |
ENDPOINT_URL = "https://api.uptimerobot.com/v2/newMonitor" | |
HEADERS = { |
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
{ | |
"to_number": "+1YOURPHONENUMBER", | |
"monitorURL": "https://rickheil.com", | |
"monitorFriendlyName": "Rick Heil Blog", | |
"alertDetails": "Keyword not found", | |
"alertType": "1" | |
} |
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
{"to_number": "+1YOURPHONEHERE", "monitorURL": "*monitorURL*", "monitorFriendlyName": "*monitorFriendlyName*", "alertDetails": "*alertDetails*", "alertType": "*alertType*"} |
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
test: | |
stage: test | |
tags: | |
- linux | |
- python | |
before_script: | |
- apt-get -qq update | |
- export DEBIAN_FRONTEND=noninteractive && apt-get -qqy install pylint python-pip virtualenv > /dev/null | |
script: | |
- source bin/activate |
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 | |
"""This is a lambda function that accepts web hooks from UptimeRobot | |
and translates them into SMS messages. Useful when you don't want to | |
pay UptimeRobot's highway robbery SMS fees. | |
Twilio code liberally lifted from their blog post on Lambda.""" | |
import os | |
import json | |
from twilio.rest import Client |
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
<?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>Gatekeeper</key> | |
<string>enabled</string> | |
<key>SIP</key> | |
<string>enabled</string> | |
</dict> | |
</plist> |
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 | |
"""Formats lpoptions output to PrinterGenerator input""" | |
import sys | |
import subprocess | |
def main(): | |
subproc = subprocess.Popen(['lpoptions', '-p', sys.argv[1], '-l'], stdout=subprocess.PIPE) | |
out, err = subproc.communicate() |
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
<?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>org.observium.agent</string> | |
<key>OnDemand</key> | |
<true/> | |
<key>ProgramArguments</key> | |
<array> |