Skip to content

Instantly share code, notes, and snippets.

View scriptsandthings's full-sized avatar

Scripts and Things scriptsandthings

  • Columbus, OH
View GitHub Profile
@shurkin18
shurkin18 / jssdistrorepair.sh
Last active March 2, 2022 21:15
JSS distribution point share folder permissions and accounts repair
#!/bin/bash
#################################################################################################################
# This script assumes, JSS is using default read and write usernames: jamf, jamfadmin
# This script also assumes that local administrator account used on the mac is named: administrator
#################################################################################################################
#Ask user to point to the share folder, browse to it via "cd"
FOLDER_TO_PROCESS=$(/usr/bin/osascript << EOD
tell application "System Events"
@zhuowei
zhuowei / Ensemble.plist
Last active September 18, 2023 06:26
Put this file as /Library/Preferences/FeatureFlags/Domain/Ensemble.plist and reboot to (hopefully) turn on Universal Control on macOS 12
<?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>
<!-- not sure which one it is, so set both -->
<key>Ensemble</key>
<dict>
<key>Enabled</key>
<true/>
</dict>
@ishad0w
ishad0w / sources.list
Last active February 10, 2025 00:49
Debian 11 (Bullseye) -- Full sources.list
deb http://deb.debian.org/debian bullseye main contrib non-free
deb-src http://deb.debian.org/debian bullseye main contrib non-free
deb http://deb.debian.org/debian bullseye-updates main contrib non-free
deb-src http://deb.debian.org/debian bullseye-updates main contrib non-free
deb http://deb.debian.org/debian bullseye-backports main contrib non-free
deb-src http://deb.debian.org/debian bullseye-backports main contrib non-free
deb http://security.debian.org/debian-security/ bullseye-security main contrib non-free
<?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>UnifiedBar</key>
<dict>
<key>DisclosureRequired</key>
<string>ace440ac-b4f6-4b43-aade-02bba1589aef</string>
<key>Enabled</key>
<false/>
@devfalse
devfalse / telnet.sh
Last active January 30, 2025 20:45
Repair IMEI number on Nighthawk M1 Mobile Router MR1100
# Enable "charge + tether" in Settings -> Setup -> Mobile Router Setup -> Tethering
# Use a usb cable to connect (tethering) to the router on port 5510
# Useful links:
# Verify the IMEI number
# https://en.wikipedia.org/wiki/Luhn_algorithm
# Challenge/Response Generator for Sierra Wireless Cards V1.0
# https://github.com/bkerler/SierraWirelessGen
ATI
@talkingmoose
talkingmoose / "Early Adopter" extension attribute
Last active November 21, 2023 22:31
Self Service policy to enable end users to enroll their Macs into an "Early Adopter Program" or any other type of enrollment. Create a Smart Computer Group to identify early adopters and scope policies.
#!/bin/zsh
enrollmentStatus=$( /usr/bin/defaults read '/Library/Preferences/EarlyAdopter.plist' Enrolled )
echo "<result>$enrollmentStatus</result>"
## Where to find info and how to report on system extensions in macOS Catalina+
# Staged system extensions location in folder based on unique ID
/Library/SystemExtensions/
# Info on each
/Library/SystemExtensions/db.plist
Includes...
- state (enabled, activated, etc.)
- associated launchd plists
@talkingmoose
talkingmoose / add-AD-user-data-to-Jamf-Pro.ps1
Last active March 11, 2022 04:02
Reads a pre-defined Advanced Computer Search and gets list of newly enrolled devices and their usernames. Looks up usernames in Active Directory and retrieves more user detail. Populates devices records with additional user in Jamf Pro.
# INSTRUCTIONS
# Create a folder on the Administrator Desktop named "Project"
# Run the script to generate the AES key
# Run the script to generate the Active Directory encrypted password file
# Run the script to generate the Jamf Pro encrypted password file
# Update the following variables:
# JamfProServer
@ChristopherA
ChristopherA / macOS-Preferences-Defaults.sh
Last active December 1, 2024 19:54
macOS Preferences Defaults
#!/usr/bin/env zsh
#===========================================================================
# * INFO
#
# macOS Preferences Defaults
# By Christopher Allen @ChristopherA https://github.com/christophera/
# My most basic macOS preferences, in this gist to make it easy to load on
# multiple machines and VMs. Ideally runs on all macOS versions since Yosemite,