Skip to content

Instantly share code, notes, and snippets.

@grahamgilbert
grahamgilbert / clean_old_apple_updates.py
Created May 9, 2018
Clean out old apple updates (older than 24 hours) because softwareupdate often refuses to install them
View clean_old_apple_updates.py
#!/usr/bin/python
"""
Removes cached apple updates that are older than 24 hours
"""
import datetime
import os
import shutil
import sys
@pudquick
pudquick / hi_groob.py
Created Jul 14, 2017
Search my gists ;p
View hi_groob.py
#!/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))
View build_recipe_list.py
#!/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)
@erikng
erikng / munki_fuzzinator.py
Created Oct 9, 2015 — forked from bruienne/munki_fuzzinator.py
Simple makecatalogs-based script to perform some level of Munki-specific linting on pkginfo files
View munki_fuzzinator.py
#!/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
@bruienne
bruienne / munki_fuzzinator.py
Created Oct 9, 2015
Simple makecatalogs-based script to perform some level of Munki-specific linting on pkginfo files
View munki_fuzzinator.py
#!/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
@geoff-nixon
geoff-nixon / osx-software-update-urls.txt
Created Sep 23, 2015 — forked from stefanschmidt/osx-software-update-urls.txt
URLs of the index files used by the software update client on OS X
View osx-software-update-urls.txt
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
@timsutton
timsutton / gist:b1affb996a2aa60b7927
Last active Sep 13, 2016
Pulling appcast URLs from brew-cask: about 500 so far
View gist:b1affb996a2aa60b7927
# 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'
View list_unused_munki_pkgs.py
#!/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.
You can’t perform that action at this time.