Skip to content

Instantly share code, notes, and snippets.

View arubdesu's full-sized avatar
📛

Allister Banks arubdesu

📛
View GitHub Profile
@arubdesu
arubdesu / Makefile
Created February 9, 2015 19:30
Makefile to repackage the currently VISE-installed stata13 for use with theLuggage https://github.com/unixorn/luggage
USE_PKGBUILD=1
include /usr/local/share/luggage/luggage.make
TITLE=StataSE13
REVERSE_DOMAIN=org.my
PACKAGE_VERSION=13.1.220
PAYLOAD=prep-StataDir \
pack-Stata
prep-StataDir: l_Applications
@arubdesu
arubdesu / case785583.txt
Created February 11, 2015 16:57
Y'know. Box
http://enterprisemac.bruienne.com/2015/02/07/box-cutting-how-i-stumbled-onto-a-serious-security-flaw-in-box-sync-for-mac/
So you rotated your API keys! Congratulations. Forcing a reboot with an auto-update is unacceptable. Especially if you didn't expose a way to turn off auto-updates to begin with. Don't do that.
Oh, and this document is wrong: https://support.box.com/hc/en-us/articles/201084243-What-features-from-Sync-3-x-have-been-removed-in-Sync-4-0-
where it says you cannot disable auto-updates.
$ sudo defaults write /Library/Preferences/com.box.sync.plist auto_update.enabled -bool False
Currently pushing this to my fleet hoping to race your auto-updater. Don't make me do that. It harms everyones productivity.
https://www.dropbox.com/s/2frza77m1il0hfk/baaaaaaad.png
@arubdesu
arubdesu / postinstall
Created February 12, 2015 20:43
Symantec DLP postflight
#!/bin/sh
InstallParentPath=/Library/Manufacturer
InstallPath="$InstallParentPath/Endpoint Agent"
PGPBinaryPath="$InstallPath/Frameworks/PGP.framework/PGP"
AgentPlistPath=/Library/LaunchDaemons/com.symantec.manufacturer.agent.plist
cleanup_and_exist_if_failure() {
if [ $1 -ne 0 ]
then
@arubdesu
arubdesu / Makefile
Created February 17, 2015 19:34
LyncWebApp luggage makefile
USE_PKGBUILD=1
include /usr/local/share/luggage/luggage.make
TITLE=LyncWebAppPlugin
REVERSE_DOMAIN=org.your
PACKAGE_VERSION=15.8
PAYLOAD=prep-LWAplugin \
pack-LWAplugin
prep-LWAplugin: l_Library
@arubdesu
arubdesu / DiagnosticMessagesHistory.plist
Created February 26, 2015 21:37
Auto-allow apple+3rd party dev to get diag/crash reports
<?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>AutoSubmit</key>
<true/>
<key>AutoSubmitVersion</key>
<integer>4</integer>
<key>ThirdPartyDataSubmit</key>
<true/>
@arubdesu
arubdesu / dockutil2015.sh
Created March 2, 2015 14:47
Setting dock without MCX/profiles once per login via outset
#!/bin/sh
# dockutil configuration via outset's login-once option
# originally tested on 10.10.3, March, 2015
set -x
sleep 4
declare -xr dockutil=/usr/local/sbin/dockutil
declare -xa ADDS=('Firefox.app' 'Google Chrome.app' 'Microsoft Outlook.app' \
'Microsoft Office 2011/Microsoft Word.app' \
@arubdesu
arubdesu / muteCCinMenubar.sh
Created March 16, 2015 16:31
outset method to stop adobeID nag when you already licensed the 'named user' pkg version, as per https://foigus.wordpress.com/2014/12/05/packaging-adobe-cc-2014-applications/
#!/bin/sh
# mute CC in menubar by unloading the silly launchAgent
set -x
if [[ -f ]]; then
/bin/launchctl unload -w /Library/LaunchAgents/com.adobe.AdobeCreativeCloud.plist
/usr/bin/killall "Creative Cloud"
fi
exit 0
@arubdesu
arubdesu / 031-20634.dist
Created April 12, 2015 03:47
OS X Yosemite Recovery Update distribution file
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<installer-gui-script minSpecVersion="1">
<options hostArchitectures="i386" customize="never"/>
<title>SU_TITLE</title>
<script>
function needsRecoveryHDUpdate(){
var baseSystemInPackage = "14D131";
if( my.target.recoverySystemVersion ) {
if (system.compareVersions( my.target.recoverySystemVersion.ProductBuildVersion, baseSystemInPackage ) &lt; 0) {
@arubdesu
arubdesu / killUnauthorizedAdminUsers.py
Last active October 3, 2017 03:19
dscl+python for common tasks
#!/usr/bin/python
import subprocess
import sys
from SystemConfiguration import *
# grab who our logging in user is
cur_console_user = SCDynamicStoreCopyConsoleUser(None, None, None)[0]
# check admin group
cmd = '/usr/bin/dscl', '.', 'list', '/Groups/admin'
out = subprocess.check_output(cmd)
# split output into list of strings for the usernames
@arubdesu
arubdesu / postflight
Created April 28, 2015 17:20
webex ftw - this filename is actually postflight, yet it's inside a flat pkg for EventCenter. Notice the commented-out 'security issue' section, mkdir -p of a parent folder and then the subfolder, and super-odd dylib odd/even math
#!/bin/sh
#
# This postflight script mv the tmp install location to user home dir
#
Logfile=/tmp/.ciscoInstallpostflight.log
dyliblist[9]=xml.dylib
dyliblist[0]=rtp-29.0.0.1.dylib
dyliblist[1]=rtp.dylib
dyliblist[2]=cmcrypto-29.13.0.1.dylib