Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/python
#
# list_unused_munki_pkgs.py
# Tim Sutton
#
# Simple script to list all Munki pkgs not currently referenced in a specific list
# of catalogs.
# It does not delete anything.
#
# CATALOGS can be modified to a list of catalogs in your repo that should be indexed.
@timsutton
timsutton / gist:b1affb996a2aa60b7927
Last active March 1, 2024 17:53
Pulling appcast URLs from brew-cask: about 500 so far
# list all local cask files and find the 'appcast' stanza
# - assumes you have brew cask installed:
# brew install caskroom/cask/brew-cask
for cask in `ls /usr/local/Library/Taps/caskroom/homebrew-cask/Casks | awk -F"." '{print $1}'`; do
cast=$(brew cask cat ${cask} | grep appcast | awk '{print $2}')
[ -n "${cast}" ] && echo "${cask}: ${cast}" | grep http
done
a-better-finder-attributes: 'http://www.publicspace.net/app/signed_abfa5.xml'
a-better-finder-rename: 'http://www.publicspace.net/app/signed_abfr9.xml'
@geoff-nixon
geoff-nixon / osx-software-update-urls.txt
Created September 23, 2015 08:04 — forked from stefanschmidt/osx-software-update-urls.txt
URLs of the index files used by the software update client on OS X
10.3 (Panther):
https://swscan.apple.com/scanningpoints/scanningpointX.xml
10.4 (Tiger):
https://swscan.apple.com/content/catalogs/index.sucatalog
https://swscan.apple.com/content/catalogs/index-1.sucatalog
10.5 (Leopard):
https://swscan.apple.com/content/catalogs/others/index-leopard.merged-1.sucatalog
@bruienne
bruienne / munki_fuzzinator.py
Created October 9, 2015 19:29
Simple makecatalogs-based script to perform some level of Munki-specific linting on pkginfo files
#!/usr/bin/env python
# encoding: utf-8
#
# Copyright 2014 - The Regents of the University of Michigan.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
@erikng
erikng / munki_fuzzinator.py
Created October 9, 2015 22:01 — forked from bruienne/munki_fuzzinator.py
Simple makecatalogs-based script to perform some level of Munki-specific linting on pkginfo files
#!/usr/bin/env python
# encoding: utf-8
#
# Copyright 2014 - The Regents of the University of Michigan.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#!/usr/bin/python
# script to build recipe_list.txt for AutoPkgr from the recipe overrides
from __future__ import print_function
import os, sys, inspect, plistlib, xml
def errprint(*args, **kwargs):
print(*args, file=sys.stderr, **kwargs)
@pudquick
pudquick / hi_groob.py
Created July 14, 2017 13:48
Search my gists ;p
#!/usr/bin/python
from Foundation import NSWorkspace, NSURL
import urllib
def show_gists():
NSWorkspace.sharedWorkspace().openURL_(NSURL.URLWithString_('https://gist.github.com/search?q=%40pudquick&ref=searchresults'))
def search_gists(search_string):
NSWorkspace.sharedWorkspace().openURL_(NSURL.URLWithString_('https://gist.github.com/search?q=%%40pudquick+%s&ref=searchresults' % search_string))
@grahamgilbert
grahamgilbert / clean_old_apple_updates.py
Created May 9, 2018 16:35
Clean out old apple updates (older than 24 hours) because softwareupdate often refuses to install them
#!/usr/bin/python
"""
Removes cached apple updates that are older than 24 hours
"""
import datetime
import os
import shutil
import sys