Skip to content

Instantly share code, notes, and snippets.

View AllPurposeBen's full-sized avatar

Ben Mason AllPurposeBen

View GitHub Profile
@mralext20
mralext20 / 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]:
@talkingmoose
talkingmoose / MegaPKGr.zsh
Last active June 26, 2023 05:37
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
bill@talkingmoose.net
https://gist.github.com/e9ed319226c6da30dd633725e48a97b0
@talkingmoose
talkingmoose / Match Version Number or Higher.bash
Last active May 6, 2024 20:13
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
bill@talkingmoose.net
https://gist.github.com/2cf20236e665fcd7ec41311d50c89c0e
@mohanpedala
mohanpedala / bash_strict_mode.md
Last active June 24, 2024 12:56
set -e, -u, -o, -x pipefail explanation
@grahampugh
grahampugh / Remove Application.sh
Last active September 28, 2023 13:20
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.
@atifazad
atifazad / sysquit_commands.md
Last active April 24, 2024 01:01
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»'