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
repos: | |
- repo: https://github.com/homebysix/pre-commit-macadmin | |
rev: v1.10.1 | |
hooks: | |
- id: check-autopkg-recipes | |
args: [ | |
"--recipe-prefix=com.github.yourusername.", | |
"--strict", | |
"--", | |
] |
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
repos: | |
- repo: https://github.com/homebysix/pre-commit-macadmin | |
rev: v1.10.1 | |
hooks: | |
- id: check-autopkg-recipes | |
args: [ | |
"--recipe-prefix=com.pretendco.cpe.", | |
"--override-prefix=local.", | |
"--strict", | |
"--", |
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
repos: | |
- repo: https://github.com/homebysix/pre-commit-macadmin | |
rev: v1.10.1 | |
hooks: | |
- id: check-autopkg-recipes | |
args: ["--recipe-prefix=com.github.yourusername."] | |
- id: forbid-autopkg-overrides | |
- id: forbid-autopkg-trust-info |
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 python3 | |
""" | |
Name: anonymizer.py | |
Description: Simple Python script that anonymizes personal and company | |
information in an input file. Useful for running on logs | |
and Terminal outputs before sharing on GitHub or Slack. | |
Author: Elliot Jordan <elliot@elliotjordan.com> | |
Created: 2021-02-03 |
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
def readable_time(seconds): | |
"""Converts a number of seconds to a human-readable time in seconds, minutes, and hours.""" | |
parts = [] | |
if seconds >= 86400: # 1 day | |
days = seconds // 86400 | |
if days == 1: | |
parts.append("{} day".format(int(days))) | |
else: | |
parts.append("{} days".format(int(days))) |
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/local/autopkg/python | |
import os | |
import plistlib | |
from glob import glob | |
from Foundation import CFPreferencesCopyAppValue | |
# Input keys we don't care about comparing. | |
EXCLUDED_KEYS = ( |
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 | |
### | |
# | |
# Name: shard.sh | |
# Description: This Casper extension attribute takes a Mac serial | |
# number as input and uses that serial number to output a | |
# number from 0 to 9. This can be useful in scoping Casper | |
# policies to a specific percentage of the fleet. | |
# Author: Elliot Jordan <elliot@elliotjordan.com> |
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/local/autopkg/python | |
# encoding: utf-8 | |
# HTTPS Spotter | |
# Copyright 2016-2020 Elliot Jordan | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# |
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/local/autopkg/python | |
# encoding: utf-8 | |
# URLMover | |
# Copyright 2019-2021 Elliot Jordan | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# |
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
JAMF Helper Help Page | |
Usage: jamfHelper -windowType [-windowPostion] [-title] [-heading] [-description] [-icon] [-button1] [-button2] [-defaultButton] [-cancelButton] [-showDelayOptions] [-alignDescription] [-alignHeading] [-alignCountdown] [-timeout] [-countdown] [-iconSize] [-lockHUD] [-startLaunchd] [-fullScreenIcon] [-kill] | |
-windowType [hud | utility | fs] | |
hud: creates an Apple "Heads Up Display" style window | |
utility: creates an Apple "Utility" style window | |
fs: creates a full screen window the restricts all user input | |
WARNING: Remote access must be used to unlock machines in this mode |