This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# --------------------------------------------------------------------------- | |
# | |
# Description: This file holds all my BASH configurations and aliases | |
# | |
# Sections: | |
# 1. Environment Configuration | |
# 2. Make Terminal Better (remapping defaults and adding functionality) | |
# 3. File and Folder Management | |
# 4. Searching | |
# 5. Process Management |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# (c) Copyright PaperCut Software, 2007 | |
# | |
# Author: Chris Dance (chris.dance <a> papercut.com) | |
# A simple script to copy printer configuration from one Apple Mac OS X | |
# system to another. | |
# | |
TARGET_HOST=`hostname` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
######################################################################## | |
# Originally Created Created By: Andrina Kelly, [email protected] | |
# Modifications from scripts from Bryson Tyrrell | |
# Final by Ross Derewianko | |
# Creation Date: April 2015 | |
# Last modified: April, 18 2015 | |
# Brief Description: Gather diagnostic logs and submit to the JSS | |
######################################################################## |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Set Variables | |
# Who's the current console user? | |
LOGGEDIN=`who | grep console | awk '{print $1}'` | |
# What's the default mail client for the logged in user? | |
DEFAULTMAIL=`defaults read /Users/$LOGGEDIN/Library/Preferences/com.apple.LaunchServices.plist | perl -e 'while(<>) {push @lines, $_; m~mailto~ and last} $_ = $lines[-2]; s~[^\"]+\"~~;s~\";~~;print'` | |
# Get the Computer Name | |
COMPUTER=`hostname` | |
# The file that sysdiagnose created to add as an attachment |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Mount the drive | |
sudo mkdir /Volumes/ClientLogs | |
mount_afp "afp://172.20.1.8/ClientLogs" /Volumes/ClientLogs | |
# Send zip file | |
dateformat=`date +"%Y-%m-%d"` | |
hostname=`jamf getComputerName | sed -e 's/<computer_name>//' -e 's/<\/\computer_name>//'` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -O -L https://dl.bintray.com/mitchellh/packer/packer_0.7.5_darwin_amd64.zip | |
unzip packer_0.7.5_darwin_amd64.zip | |
sudo mv packer_0.7 /usr/local/packer | |
sudo chown $USER /usr/local/packer/ | |
# then update your .bash_profile with the new path e.g.: | |
# export PATH="/usr/local/git/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/local/packer:$PATH" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# cf. http://www.macos.utah.edu/documentation/authentication/dscl.html | |
if [[ "$(/usr/bin/whoami)" != "root" ]]; then printf '\nMust be run as root!\n\n'; exit 1; fi | |
OPATH=$PATH | |
export PATH=/usr/bin:/usr/sbin:/bin:/sbin | |
OIFS=$IFS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
/System/Library/CoreServices/Menu\ Extras/User.menu/Contents/Resources/CGSession -suspend |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
JAMFHELPER="/Library/Application Support/JAMF/bin/jamfHelper.app/Contents/MacOS/jamfHelper" | |
# Constants | |
mdmAirport="AirportNetworkName" | |
jhWindowType="utility" | |
jhTitle="System Management" | |
jhDescription="Please select the $mdmAirport network from the AirPort menu in the menu bar." | |
# The icon to show in the jamfHelper dialog box | |
jhIcon="/Library/Application Support/JAMF/icon.png" | |
# Name of the AirPort network which will be removed and added by removing and adding MDM profiles |
OlderNewer