Skip to content

Instantly share code, notes, and snippets.

View thewellington's full-sized avatar

W. S. Wellington thewellington

View GitHub Profile
@thewellington
thewellington / bluetoothDiscover
Created January 24, 2014 15:38
Bluetooth Discoverability is OS X Mavericks #mac #bluetooth
defaults -currentHost write com.apple.Bluetooth DiscoverableState -bool no
@thewellington
thewellington / crashplanFixup.sh
Last active October 27, 2018 06:11
Prevent CrashPlan from de-duplicating data on a Mac. Improves transfer speed! #mac #blog #crashplan
#!/bin/bash
#
# crashplanFixup.sh for Macintosh OS X 10.9 (and probably earlier versions)
#
# This script will prevent CrashPlan from de-duplicating data on files greater than 1k.
# Based on information from http://networkrockstar.ca/2013/09/speeding-up-crashplan-backups/
#
# NOTE: Must be run with sudo! IE: $ sudo sh ./crashplanFixup
#
# v1.1 2014-03-13 by bill@wellingtonnet.net
@thewellington
thewellington / ciscoAnyConnectVPN.py
Last active January 13, 2021 02:22
Used to initiate a connection to a Cisco AnyConnect Secure Mobility VPN, from a Mac. Requires the Cisco AnyConnect Secure MobilityClient, and a couple of python packages. #mac #cisco #vpn #blog
#!/usr/bin/env python
#
# This script will launch the Cisco AnyConnect Mobility Client from the
# command line, and using credentials stored in the the user's Logon Keychain,
# will initiate a connection to the VPN endpoint.
#
# Requirements:
# - Cisco AnyConnect Mobility Client is assumed to be installed, and in its
# default location.
# - Python 'keyring' package is assumed to be installed. Please see
@thewellington
thewellington / generatePhoneList.sh
Created February 14, 2014 16:01
Generate a telephone list using Active Directory, Word, and a Mac. Ick! #mac #active_directory #ad #phone_list
#!/bin/bash
# Phone List Generator v. 2 by bill_wellington at aw.org
# This script will pull live data from Active Directory and output a .csv
# file (named as an argument) including first name, last name, department,
# phone ext. and mobile phone ext. It goes through a strips out all
# constituents who are students, members of the "Class of...", or who do
# not have a 4 digit extension listed in either their phone number or
# their mobile number. The list can then be used to generate a phone list
# using MS Word's mail merge functions.
@thewellington
thewellington / removeOffice2011.sh
Created February 20, 2014 17:45
Removes Office 2011 for our Office 265 Migration #mac #office
#!/bin/bash
#
# Uninstall Office for Mac 2011 per http://support.microsoft.com/kb/2398768
#
# by bwellington@fulcrum.net
# Remove Office 2011
rm -Rf /Applications/Microsoft\ Office\ 2011
@thewellington
thewellington / dsstore_cleanup.sh
Created August 15, 2014 15:48
This script will recursively delete the .DS_Store file generated by Macintosh computers. It takes a single argument, the path of the directory where you wish to begin the recursive deletion. Works on both Linux and Macs (with GNU find or BSD find)
#!/usr/bin/env bash
#
# This script will recursively delete the .DS_Store file generated by Macintosh computers.
# It takes a single argument, the path of the directory where you wish to begin the recursive deletion.
#
# works on both Linux and Macs (with GNU find or BSD find)
#
# EXAMPLE:
# dsstore_cleanup.sh /path/to/directory/
#
@thewellington
thewellington / modernie.sh
Last active August 29, 2015 14:06
Downloads and Installs Win7 and IE 9 - VMware Fusion VM for Macintosh
#!/usr/bin/env bash
#
# v1.0 - 2014-09-18
#
# downloads rar files from modern.ie and extracts them.
#
# INSTRUCTIONS: place this script in your home directory, set the executable bit, and run it.
URL='https://www.modern.ie/vmdownload?platform=mac&virtPlatform=vmware&browserOS=IE9-Win7&parts=4&filename=VMBuild_20131127/VMware/IE9_Win7/Mac/'
RAR_REGEX='IE9.Win7.For.MacVMware.part0{1.sfx,2.rar,3.rar,4.rar}'
@thewellington
thewellington / extract_email.sh
Created October 20, 2014 14:41
regex to extract email addresses from a blob of text.
#!/usr/bin/env bash
#
#
# regex to extract email addresses from a blob of text.
#
# grep -i -o '[A-Z0-9._%+-]\+@[A-Z0-9.-]\+\.[A-Z]\{2,4\}' source_file.txt > dest_file.txt
#
#
@thewellington
thewellington / switch.sh
Created January 30, 2015 17:39
Programmatically switch between your first 16 desktops in OS X Mavericks and Yosemite
#!/bin/bash
#
# switch.sh
# Allows for scripting the switching of the first 16 "Desktops" in OS X Mavericks
#
# Requires Mission Control Keyboard Shortcuts to be activated:
# Go to System Preferences -> Keyboard -> Shortcuts -> Mission Control.
# Click the expand Triangle next to Mission Control in the right hand pane.
# Activate "Switch to Desktop { 1-16 }
#
@thewellington
thewellington / change_computer_name.sh
Created April 27, 2015 22:23
JAMF Casper Suite change computer name before binding to AD
#!/bin/bash
#
# change_computer_name.sh
# 2015-04-06 by bill@wellingtonnet.net
#
# This script is for use with JAMF Casper Suite and makes some assumptions about
# the context in which it is running, specifically that arguments are served by
# the JSS and that arguments 1 through 3 are predefined as mount point, computer
# name, and username, respectively.
#