Skip to content

Instantly share code, notes, and snippets.

@rtrouton
rtrouton / gist:1e25fdfb3aa24ae61bda
Created July 16, 2015 17:13
Casper 9.73 ciphers - for Java 6 and later.
ciphers="TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA,TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDH_RSA_WITH_AES_256_CBC_SHA,TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA,TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256,TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDH_RSA_WITH_AES_128_CBC_SHA,TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA,TLS_RSA_WITH_AES_128_CBC_SHA"
@rtrouton
rtrouton / set_dns_search_domains_on_wifi_interfaces
Created June 5, 2015 22:08
This script will set specified DNS search domains on a Mac's wireless interface(s).
#!/bin/bash
# For the SearchDomains variable, change the search domains
# to be the ones you need, separated by spaces. For example,
# if you needed to set verizon.com and comcast.com as DNS
# search domains, SearchDomains would be set like this:
#
# SearchDomains="verizon.com comcast.com"
#
@rtrouton
rtrouton / gist:11bc3f21f47e1a79d099
Last active April 9, 2020 23:03
Downloading the latest release of a project from GitHub
#!/bin/bash
# How to set these variables:
#
# GitHub_Owner
# GitHub_Repo
#
# Example use:
#
# The Linde Group has repos on GitHub available
@rtrouton
rtrouton / gist:3c1032e9454ceda0ad66
Created May 12, 2015 20:31
Installer postinstall script that installs two Office 2011 installers (the Office 2011 14.4.2 full installer and the 14.5.0 update) and automatically fixes an issue with the volume license being wiped out by the 14.5.0 update
#!/bin/sh
# Determine working directory
install_dir=`dirname $0`
# Location of Microsoft Office Volume License file
office_license="$3/Library/Preferences/com.microsoft.office.licensing.plist"
@rtrouton
rtrouton / gist:17c89776ee393f4222cc
Created May 11, 2015 12:58
Script to install the latest available version of Oracle's Java 8 for OS X. Includes check of the Developer ID Installer certificate to verify it was signed by Oracle.
#!/bin/bash
# This script downloads and installs the latest Oracle Java 8 for compatible Macs
# Determine OS version
osvers=$(sw_vers -productVersion | awk -F. '{print $2}')
# Specify the "OracleUpdateXML" variable by adding the "SUFeedURL" value included in the
# /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Info.plist file.
#
@rtrouton
rtrouton / gist:6552a3010931f7a5b5ae
Created May 11, 2015 12:57
Script to install the latest available version of Adobe Flash for OS X. Includes check of the Developer ID Installer certificate to verify it was signed by Adobe.
#!/bin/bash
# This script downloads and installs the latest Flash player for compatible Macs
# Determine OS version
osvers=$(sw_vers -productVersion | awk -F. '{print $2}')
# Determine current major version of Adobe Flash for use
# with the fileURL variable
@rtrouton
rtrouton / gist:068d872aad15b26381bb
Last active December 15, 2015 12:19
Installing the latest VMware Tools using AutoPkgr
#!/bin/bash
# fork of Tim Sutton's osx-vm-template script:
# https://github.com/timsutton/osx-vm-templates/blob/master/scripts/puppet.sh
# Install the latest VMware Tools using AutoPkg recipes
# https://github.com/autopkg/autopkg
#
# Note: Either Xcode.app or the Xcode command line tools
# must be installed and licensed before running this script.
@rtrouton
rtrouton / gist:e050c1f0ba78223a9927
Created April 17, 2015 18:38
Add Admin User AppleScript
set result to text returned of (display dialog "Enter the Username to be made an admin:" default answer "")
if result is not false then
set userName to result
try
do shell script "dseditgroup -o edit -a " & userName & " -t user -n . admin" with administrator privileges
display dialog "Added " & userName & " as an Admin" buttons {"OK"} default button "OK"
on error errorText
@rtrouton
rtrouton / gist:796e695be708dc655ffa
Created March 6, 2015 22:11
Java 8 Update 40 install.app with Ask.com browser setting checked
computername:~ username$ sudo /Volumes/Java\ 8\ Update\ 40/Java\ 8\ Update\ 40.app/Contents/MacOS/MacJREInstaller
2015-03-06 16:21:39.842 MacJREInstaller[608:10435] path: /var/root/Library/Application Support/JREInstaller
2015-03-06 16:21:39.844 MacJREInstaller[608:10435] ---- INSTALL RUN |||| 03-06-2015 04:21:39 -0500
2015-03-06 16:21:39.844 MacJREInstaller[608:10435] Install Log: Type:Network Severity:Debug Message:Download Staged XML from :https://javadl-esd-secure.oracle.com/update/1.8.0/mac-1.8.0_40-b25.xml
2015-03-06 16:21:40.105 MacJREInstaller[608:10435] Install Log: Type:Other Severity:Debug Message:Application support directory:/var/root/Library/Application Support
2015-03-06 16:21:40.112 MacJREInstaller[608:10435] Install Log: Type:Network Severity:Debug Message:Arguments:(
"/Volumes/Java 8 Update 40/Java 8 Update 40.app/Contents/MacOS/MacJREInstaller",
""
)
2015-03-06 16:21:40.112 MacJREInstaller[608:10435] Install Log: Type:Other Severity:Debug Message:Dictionary:{
@rtrouton
rtrouton / gist:267d693cdcaf6ce4ba73
Created March 6, 2015 17:33
Java 8 Update 40 install.app with Ask.com browser setting unchecked
computername:~ username$ sudo /Volumes/Java\ 8\ Update\ 40/Java\ 8\ Update\ 40.app/Contents/MacOS/MacJREInstaller
WARNING: Improper use of the sudo command could lead to data loss
or the deletion of important system files. Please double-check your
typing when using sudo. Type "man sudo" for more information.
To proceed, enter your password, or type Ctrl-C to abort.
Password:
2015-03-06 12:29:57.283 MacJREInstaller[485:5546] path: /var/root/Library/Application Support/JREInstaller