Skip to content

Instantly share code, notes, and snippets.

View kd8drx's full-sized avatar
🏳️‍🌈

Kiley Davidson kd8drx

🏳️‍🌈
View GitHub Profile
/* From https://github.com/raspberrypi-ui/rc_gui/blob/master/src/rc_gui.c#L23-L70 */
#define GET_CAN_EXPAND "sudo raspi-config nonint get_can_expand"
#define EXPAND_FS "sudo raspi-config nonint do_expand_rootfs"
#define GET_HOSTNAME "sudo raspi-config nonint get_hostname"
#define SET_HOSTNAME "sudo raspi-config nonint do_hostname %s"
#define GET_BOOT_CLI "sudo raspi-config nonint get_boot_cli"
#define GET_AUTOLOGIN "sudo raspi-config nonint get_autologin"
#define SET_BOOT_CLI "sudo raspi-config nonint do_boot_behaviour B1"
#define SET_BOOT_CLIA "sudo raspi-config nonint do_boot_behaviour B2"
#define SET_BOOT_GUI "sudo raspi-config nonint do_boot_behaviour B3"
@cleavenworth
cleavenworth / Okta-Jamf-LDAPSettings.txt
Last active July 11, 2023 02:06
LDAP Mapping and Configuration Settings for Okta LDAP > Jamf
LDAP Servers
Connection --
Directory Service: Configure Manually
Server and Port: company.ldap.okta<preview>.com : 636
Use SSL: True
Authentication Type: Simple
Distinguished Username: uid=account@company.com,dc=company,dc=okta<preview>,dc=com
Use Wildcards when Searching: True
@erikng
erikng / kextidentifiers.py
Last active April 19, 2021 22:51
kextidentifiers.py
#!/usr/bin/python
# For mojave only
# In order for this to work, you will need to go to System Preferences in Mojave -> Security & Privacy -> Privacy -> Full Disk Access and grant Terminal.app permissions
import sqlite3
conn = sqlite3.connect('/var/db/SystemPolicyConfiguration/KextPolicy')
c = conn.cursor()
query = 'SELECT * FROM kext_policy'
c.execute(query)
@haircut
haircut / README.md
Last active February 20, 2020 13:01
How to manage ONLY FDE Recovery Key Escrow in Jamf Pro 9.101+

How to manage ONLY FDE Recovery Key Escrow in Jamf Pro 9.101+

The Jamf Pro GUI allows you to automatically set up the necessary payloads to manage the FDE Recovery Key Escrow process for macOS 10.13+.

However, the settings reside in the "Security & Privacy" grouping within the Jamf Pro GUI, forcing you to manage settings other than those related to recovery key escrow. You may inadvertently lock your users out of being able to make changes to the firewall, analytics settings, screen saver password requirement, etc.

You can upload a custom profile to the Jamf Pro Server that manages only FDE Recover Key Escrow preferences, but it takes a little work.

You'll also need to sign your resultant configuration profile to prevent the Jamf Pro Server from manipulating its contents or preventing deployment. You can use an Apple Developer certificate, or your Jamf Pro Server's CA (if self signed).

@haircut
haircut / collect-info.py
Last active September 15, 2021 02:15
Spiffy GUI for Jamf Pro workflows
#!/usr/bin/python
"""
Collect Info
To be used in a Jamf Pro workflow to prompt a user/tech for info
Heavily cribbed from Jamf's iPhone ordering script:
https://github.com/jamfit/iPhone-Ordering
"""
@martinseener
martinseener / gist:5238576
Last active March 23, 2021 01:20
Grok ESXi 5.x Pattern (for Logstash) (including puppet format with special escaping!)
filter {
grok {
pattern => ['(?:%{SYSLOGTIMESTAMP:timestamp}|%{TIMESTAMP_ISO8601:timestamp8601}) (?:%{SYSLOGHOST:logsource}) (?:%{SYSLOGPROG}): (?<messagebody>(?:\[(?<esxi_thread_id>[0-9A-Z]{8,8}) %{DATA:esxi_loglevel} \'%{DATA:esxi_service}\'\] %{GREEDYDATA:esxi_message}|%{GREEDYDATA}))']
type => "esxi"
}
}
# Puppet format with escaping
pattern => [ "(?:%{SYSLOGTIMESTAMP:timestamp}|%{TIMESTAMP_ISO8601:timestamp8601}) (?:.* (?:%{SYSLOGFACILITY} )?%{SYSLOGHOST:logsource} %{SYSLOGPROG}|(?:%{SYSLOGFACILITY} )?%{SYSLOGHOST:logsource} %{SYSLOGPROG}): (?:(?:\[[0-9A-Z]{8,8}) (?:%{GREEDYDATA:esxi_loglevel}) \\\'(?:%{GREEDYDATA:esxi_service})\\\'] (?:%{GREEDYDATA:message})|(?:%{GREEDYDATA:message}))" ],