Skip to content

Instantly share code, notes, and snippets.

View timsutton's full-sized avatar
🍁

Timothy Sutton timsutton

🍁
View GitHub Profile
@timsutton
timsutton / set_comp_name_mac.sh
Created November 21, 2014 12:07
Set a computer name that contains the last half of the MAC of the "Ethernet" network service
mac_portion=$(networksetup -getmacaddress Ethernet | egrep -o "([0-9a-f]{2}:){5}[0-9a-f]{2}" | cut -f 4-6 -d ':' | tr -d ':')
sudo scutil --set ComputerName "travis-${mac_portion}"
@timsutton
timsutton / make_brew_omnibus_osx_pkg.sh
Last active August 29, 2015 14:10
Dead-simple Omnibus-style installer package builder for OS X using Homebrew.
#!/bin/sh -e
#
# make_brew_omnibus_osx_pkg.sh
# Tim Sutton, 2014
#
# Dead-simple Omnibus-style installer package builder for OS X using Homebrew. It
# takes no command-line options or arguments: all configuration is done using
# environment variables:
#
# - FORMULA: (required) name of Homebrew formula
<?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>PayloadContent</key>
<array>
<dict>
<key>PayloadContent</key>
<dict>
<key>com.apple.mcxMenuExtras</key>
#!/usr/bin/python
# Very rough script that clones all the repos under a GitHub
# user to temp directories, then calls `autopkg list-recipes`
# along with --search-dir for each directory. The recipe
# names are printed out along with a 'summary' of the different
# recipe types. Directories are cleaned up afterwards, and
# no configuration from com.github.autopkg is used.
#
# Tested mainly just using the 'autopkg' user, which is the default.
#!/bin/sh
#
# Standard script that gets called by all the install scripts to setup standard properties
#
appBaseName=CrashPlan
versionName=3.7.0
productName=CrashPlanPROe
@timsutton
timsutton / Autologout_NoFUS.plist
Last active August 29, 2015 14:20
Sample profile that manages .GlobalPreferences
<?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>PayloadContent</key>
<array>
<dict>
<key>PayloadContent</key>
<dict>
<key>.GlobalPreferences</key>
<?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>BuildMaps</key>
<dict>
<key>YosemiteGeneric</key>
<string>^14[A-G].*$</string>
<key>Old</key>
<string>^10.*$</string>
#!/bin/sh
defaults write /Library/Preferences/com.airmusictech.Boom Content -string "/Applications/AIR Music Technology/Boom"
defaults write /Library/Preferences/com.airmusictech.Mini\ Grand Content -string "/Applications/AIR Music Technology/Mini Grand"
defaults write /Library/Preferences/com.airmusictech.Structure "common binary" -string "/Applications/AIR Music Technology/Common/AIR/bin/"
defaults write /Library/Preferences/com.airmusictech.Structure "common content" -string "/Applications/AIR Music Technology/Common/AIR/Content/"
defaults write /Library/Preferences/com.airmusictech.Structure "content" -string "/Applications/AIR Music Technology/Structure/Content/Patches/Structure Free/"
defaults write /Library/Preferences/com.airmusictech.Structure "effects" -string "/Applications/AIR Music Technology/Structure/Settings/"
defaults write /Library/Preferences/com.airmusictech.Structure "favorites" -string "/Applications/AIR Music Technology/Structure/Favorites/"
@timsutton
timsutton / AdobeSerialization_dbcs_flags.m
Created May 26, 2015 14:48
Just one set of functions disassembled from AdobeSerialization referencing the command flags based on the 'DBCS' type attr in the EnigmaData tag.
int sub_27be(int arg0, int arg1) {
esi = ___stack_chk_guard;
var_10 = *esi;
if (geteuid() != 0x0) {
edi = sub_3dbe();
}
else {
var_46C = esi;
var_464 = sub_4b2f();
var_88 = std::string::_Rep::_S_empty_rep_storage + 0xc;
autopkg run MSOffice2011Updates.munki -k VERSION=14.1.0 -k DISABLE_CODE_SIGNATURE_VERIFICATION=True -v -k MUNKI_REPO=/tmp
Processing MSOffice2011Updates.munki...
MSOffice2011UpdateInfoProvider
MSOffice2011UpdateInfoProvider: Found URL http://download.microsoft.com/download/D/F/D/DFDEF1D6-7078-48E2-90B9-9EBE8D8AE059/Office2011-1410UpdateEN-AU.dmg
MSOffice2011UpdateInfoProvider: Got update: 'Office 2011 14.1.0 Update'
MSOffice2011UpdateInfoProvider: Additional pkginfo: {'installs': [{'path': '/Applications/Microsoft Office 2011/Office/MicrosoftComponentPlugin.framework', 'CFBundleVersion': '14.1.0', 'CFBundleShortVersionString': '14.1.0', 'version_comparison_key': 'CFBundleShortVersionString', 'type': 'bundle'}], 'minimum_os_version': '10.5.8', 'display_name': 'Office 2011 14.1.0 Update', 'description': '<html><p>This update fixes critical issues and also helps to improve security. It includes fixes for vulnerabilities that an attacker can use to overwrite the contents of your computer\'s memory with malicious