This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# This ugly script sets the proper passphrase per department | |
# it retrieves the department via the JAMF API | |
API_URL=https://YOURJAMFSERVER:8443/JSSResource | |
API_USER=api_user | |
API_PASS=$4 | |
# Get serial number | |
myserial=$(system_profiler SPHardwareDataType | awk '/Serial Number/{print $4}') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# encoding: utf-8 | |
''' Downloads iBooks from Stack storage | |
Complexity is a result from the CSRF token that is needed for the download. | |
''' | |
import urllib, urllib2, json, re, cookielib, os, xattr | |
from Cocoa import NSWorkspace, NSImage | |
PAGE_URL = 'https://username.stackstorage.com/s/6hjYxxxxKnp6x' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Script that creates two installer packages with the same destination app | |
# but different CFBundleIdentifiers. | |
# These trigger in macOS installer the creation of a .localized version | |
mkdir -p /tmp/test/Applications/Test.app/Contents | |
/usr/libexec/plistbuddy -c "Add :CFBundleIdentifier string macadmins.test.1" /tmp/test/Applications/Test.app/Contents/Info.plist | |
pkgbuild --root /tmp/test /tmp/test.1.pkg | |
/usr/libexec/plistbuddy -c "Set :CFBundleIdentifier string macadmins.test.2" /tmp/test/Applications/Test.app/Contents/Info.plist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# Get all local users and calculate the size of the homedirectory | |
import os, pwd, plistlib | |
system_accounts = ['root', 'daemon', 'nobody', 'Guest'] | |
account_list = [] | |
def get_size(start_path): | |
total_size = 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php $this->view('partials/head', array('scripts' => array('clients/client_list.js'))); ?> | |
<?php //Initialize models needed for the table | |
new Machine_model; | |
new Reportdata_model; | |
new department_model; | |
?> | |
<div class="container"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*! | |
* Custom javascript for munkireport | |
* | |
*/ | |
$(document).on('appReady', function(e, lang) { | |
// Add Site info to listing | |
var listingDropdown = $('span[data-i18n="nav.main.listings"]').parent().next(); | |
listingDropdown.append( | |
$('<li>') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
"""Mac OS X Disk/Volume script for munkireport. | |
https://github.com/munkireport/munkireport-php | |
Some ideas and functions are borrowed from gmacpyutil | |
https://github.com/google/macops | |
The script iterates over all partitions and returns a list | |
of Volumes with basic info (TotalSize, FreeSpace, MountPoint, VolumeName) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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>_metadata</key> | |
<dict> | |
<key>created_by</key> | |
<string>jenkins</string> | |
<key>creation_date</key> | |
<date>2015-02-13T13:32:57Z</date> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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>_metadata</key> | |
<dict> | |
<key>created_by</key> | |
<string>jenkins</string> | |
<key>creation_date</key> | |
<date>2015-02-11T04:46:00Z</date> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# encoding: utf-8 | |
# | |
# Copyright 2009-2014 Arjen van Bochoven. | |
# | |
# 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 |
NewerOlder