Skip to content

Instantly share code, notes, and snippets.

View h4rm0n1c's full-sized avatar

Harrison Mclean h4rm0n1c

  • Perth, Australia
View GitHub Profile
@h4rm0n1c
h4rm0n1c / setbrowserdefaults.sh
Created August 6, 2013 06:40
setbrowserdefaults.sh sets the defaults for the three web browsers I usually include with an OS X deployment. This will set up Firefox, Chrome and Safari to roughly the same defaults each, using the provided homepage variable. These defaults will also apply to any existing users. WARNING: THIS SCRIPT DELETES ANY EXISTING USER PREFS FOR EACH BROW…
#!/bin/sh
#Change BROWSER_HOMEPAGE to whatever you need, everything else will work as is.
BROWSER_HOMEPAGE="http://www.google.com/"
## BEGIN FIREFOX
if [ -d "/Applications/Firefox.app" ]
then
#CLear out any imposters, accept no substitutes!
rm -f /Applications/Firefox.app/Contents/MacOS/defaults/pref/local-settings.js
rm -f /Applications/Firefox.app/Contents/MacOS/mozilla.cfg
@h4rm0n1c
h4rm0n1c / mkfirstboot.sh
Last active December 20, 2015 16:38
This is a template derived from a script I wrote with some ideas taken from https://gist.github.com/pklaus/931579 with the original scripts coming from Ricardo Gameiro, Philipp Klaus and Daniel Jenkins.
#!/bin/bash
#Template for first boot script creator.
#feel free to modify this to make use of arguments, allowing for script installation on a different volume.
#I have made use of nowdoc syntax to intepret the enclosed strings as literal strings with no parsing done.
#Harrison Mclean a.k.a h4rm0n1c
#better than using cd, we pop this directory off of the stack at the end of the script.
pushd /System/Library/StartupItems
mkdir FirstRun