# pull container for https://github.com/rcrowley/certified
docker pull groob/certified:latest
# create CA and intermediary CA; will prompty you for a password
docker run --rm -it --name certified -v $(pwd)/certs:/certified/etc -e GIT_USER=groob -e GIT_EMAIL=groob+github@gmail.com groob/certified certified-ca C="US" ST="NY" L="New York" O="Example" CN="groob-ca"
# create server cert
docker run --rm -it --name certified -v $(pwd)/certs:/certified/etc -e GIT_USER=groob -e GIT_EMAIL=groob+github@gmail.com groob/certified certified CN="servq.groob.io"
# create cert chain as server.crt
cat certs/ssl/certs/servq.groob.io.crt certs/ssl/certs/ca.crt certs/ssl/certs/root-ca.crt > server.crt
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>PayloadIdentifier</key> | |
<string> | |
com.apple.mdm.server1.local.%first_uuid%.alacarte</string> | |
<key>PayloadRemovalDisallowed</key> | |
<false /> |
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
package main | |
import ( | |
"fmt" | |
"log" | |
"os" | |
"github.com/groob/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
<?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>PayloadIdentifier</key> | |
<string>org.example.profile.chrome</string> | |
<key>PayloadRemovalDisallowed</key> | |
<true/> | |
<key>PayloadScope</key> | |
<string>System</string> |
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 | |
# -*- coding: utf-8 -*- | |
import sys | |
import logging as log | |
from copy import copy | |
if not sys.platform.startswith("win") and sys.stderr.isatty(): |
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 | |
export PATH=/usr/bin:/bin:/usr/sbin:/sbin | |
installerBuildVersion() { # $1 path to the installer app | |
installerApp=${1:?"no path for installer"} | |
# echo "inspecting: $installerApp" | |
if [[ -d "$installerApp" ]]; then | |
identifier=$(/usr/libexec/PlistBuddy -c "print CFBundleIdentifier" "$installerApp/Contents/Info.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
# Tested on 10.11 | |
# Assumes your network is in a state to actually do the discovery and that you have | |
# automatic timezone discovery enabled in Date & Time and Location services enabled | |
# (Generally this means wifi enabled on your device and network stack is up) | |
# For enabling location services and auto, check Allister's work here: | |
# https://gist.github.com/arubdesu/b72585771a9f606ad800 | |
from Foundation import NSBundle | |
TZPP = NSBundle.bundleWithPath_("/System/Library/PreferencePanes/DateAndTime.prefPane/Contents/Resources/TimeZone.prefPane") |
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 | |
# | |
# Provides standard user access to preference panels they would expect to be able to access, and might need access to. | |
# | |
# Provides standard users access to system preferences | |
/usr/bin/security authorizationdb write system.preferences allow |
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 | |
# Usage: | |
# | |
# - Install jq: https://stedolan.github.io/jq/ | |
# - Add this script to your path, eg. to /usr/local/bin | |
# - Add AWS access key id and secret access key to LastPass | |
# named "AWS Credentials for my-profile profile" | |
# - Add "credential_process = awscreds-lpass my-profile" to | |
# the respective profile in ~/.aws/config |
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 examples converts the millisecond epoch of API Gateway | |
## to the seconds epoch of DynamoDB and adds 5 minutes for the TTL. | |
#set( $epoch = $context.requestTimeEpoch / 1000 + 300 ) | |
{ | |
"TableName":"Epoch", | |
"Item":{ | |
"id":{"S":"$context.requestId"}, | |
"ttlTime":{"N":"$epoch"} | |
} |
OlderNewer