Skip to content

Instantly share code, notes, and snippets.

<?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>AutoUpdate</key>
<false/>
<key>PayloadDisplayName</key>
#!/usr/bin/python
# encoding: utf8
#
# Portions of code re-used from "makecatalogs" by Greg Neagle
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# Yo may obtain a copy of hte License at
#
# https://www.apache.org/licenses/LICENSE-2.0
<?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>
<?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>
@rickheil
rickheil / 00-graylog-proxy
Last active August 29, 2021 11:43
nginx configuration for graylog reverse proxy, HTTPS forced
server {
listen 80;
return 301 https://$host$request_uri;
}
server {
listen 443;
server_name graylog.example.com;
@rickheil
rickheil / wmic-install
Created January 29, 2016 18:20
installing wmic for linux
#!/bin/bash
# compiles WMIC for linux
apt-get install autoconf
cd /usr/src
wget http://www.openvas.org/download/wmi/wmi-1.3.14.tar.bz2
bzip2 -cd wmi-1.3.14.tar.bz2 | tar xf -
cd wmi-1.3.14/
@rickheil
rickheil / 00-graylog-proxy
Created July 2, 2015 18:33
nginx configuration for graylog reverse proxy
server {
listen 80;
server_name graylog.example.com;
access_log /var/log/nginx/graylog.access.log;
location / {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
#!/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("|")
<?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>
#!/usr/bin/python
"""
MDM status reporting tool. Requires macOS 10.13.4+ for command output compatibility.
"""
import subprocess
import os
import plistlib
import sys