Skip to content

Instantly share code, notes, and snippets.

View AllPurposeBen's full-sized avatar

Ben Mason AllPurposeBen

View GitHub Profile
@atifazad
atifazad / sysquit_commands.md
Last active May 31, 2025 06:48
osascript commands to shutdown, restart, sleep and logout mac

Shut down without showing a confirmation dialog:

osascript -e 'tell app "System Events" to shut down'

Shut down after showing a confirmation dialog:

osascript -e 'tell app "loginwindow" to «event aevtrsdn»'
@grahampugh
grahampugh / Remove Application.sh
Last active February 17, 2025 18:15
A Jamf Pro script to remove applications in the Applications folder.
#!/bin/bash
#######################################################################
#
# Remove Application Script for Jamf Pro
#
# This script can delete apps that are sandboxed and live in /Applications
#
# The first parameter is used to kill the app. It should be the app name or path
# as required by the pkill command.
@mohanpedala
mohanpedala / bash_strict_mode.md
Last active June 6, 2025 19:54
set -e, -u, -o, -x pipefail explanation
@talkingmoose
talkingmoose / Match Version Number or Higher.bash
Last active May 30, 2025 16:14
Generates a regular expression (regex) that matches the provided version number or higher. Useful for Jamf Pro's "matches regex" operator in searches and smart groups where the results need to be the current version of an app or higher.
#!/bin/bash
<<ABOUT_THIS_SCRIPT
-------------------------------------------------------------------------------
Written by:William Smith
Professional Services Engineer
Jamf
[email protected]
https://gist.github.com/2cf20236e665fcd7ec41311d50c89c0e
@talkingmoose
talkingmoose / MegaPKGr.zsh
Last active March 28, 2025 15:03
The pkgbuild binary and Jamf Composer don't support adding single files of 8 GB or more to a package. Some apps like Install macOS Big Sur.app include files larger than 8 GB in their bundles. This script will create a deployable PKG file from apps whose bundles include those large files.
#!/bin/zsh
:<<ABOUT_THIS_SCRIPT
-------------------------------------------------------------------------------
Written by:William Smith
Professional Services Engineer
Jamf
[email protected]
https://gist.github.com/e9ed319226c6da30dd633725e48a97b0
@xela-zone
xela-zone / schoolCafe.py
Created March 5, 2021 19:02
School cafe discord poster
from datetime import date as Date
import requests as req
import json
from tokens import discord_alex # a discord token
from tokens import post_discord # a method to post to a discord channel a string
def get_items(menu, category):
ret_list = []
for i in menu[category]:
@rickklaasboer
rickklaasboer / how-to-setup-plex-with-sonarr-radarr-jackett-overseerr-and-qbittorrent-using-docker.md
Last active June 3, 2025 21:18
How to setup Plex with Sonarr, Radarr, Jackett, Overseerr and qBitTorrent using Docker

How to setup Plex with Sonarr, Radarr, Jackett, Overseerr and qBitTorrent using Docker

Before continuing: This guide is currently outdated but I'm working on a new one with upgrading steps included. I'll link it here once it's finished :)

This is a guide that will show you how to setup Plex Media Server with Sonarr, Radarr, Jackett, Overseerr and qBitTorrent with Docker. It is written for Ubuntu 20.04 but should work on other Linux distributions as well (considering supported distributions by Docker). It is also written for people who have some experience with Linux and Docker. If you are new to Docker, I recommend you to read the Docker documentation, and if you are new to Linux, I recommend you to read the Ubuntu documentation.

Now, let's get started!

Please note: This guide was written without considering hardlinking for Sonarr/Radarr. If you want to use hardlinking refer to #Hardlinking

@talkingmoose
talkingmoose / Sequoia-compatible Macs (regex)
Last active May 28, 2025 13:43
Regex looks for all Mac models compatible with macOS Sequoia. May not be up-to-date with newly released models.
https://www.apple.com/macos/macos-sequoia/
Published Date: June 10, 2024
Updated November 8, 2024
Updated May 28, 2025
Verification: https://regex101.com/r/bNOMXz/10
1) Exact regex — Matches major model identifier numbers based on Apple's knowledge base article (more accurate):
^(Mac(1[3-6]|BookPro1[5-8]|BookAir(9|10)|Pro7)|iMac(Pro1|(19|2[01]))|Macmini[89]),\d+$