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 | |
#----------VARIABLES--------- | |
# Manually set ethernet device ID | |
ethernetID="en0" | |
# Put static IPv4 with subnet mask here | |
ethernetIP="10.x.x.x 255.x.x.x" | |
# Organization name (reverse-domain plist format) | |
orgName="org.enterprise.casper" |
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 | |
# Pings the IP address that any computer gets when booted to Single-User Mode | |
# Works best to set it to ping every 2 seconds (set refresh rate in Geektool) | |
ping -c 1 10.x.x.x &> /dev/null | |
# If that address is pingable, | |
if [ $? = 0 ];then | |
# Sound the "red alert" klaxon for speakers connected to this computer | |
afplay /Users/Shared/klaxon.mp3 |
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 | |
# https://github.com/jacobsalmela | |
# Enables outbound SSH in single-user mode on OS X | |
# Save this file as /var/root/.profile and boot into single-user mode | |
# Last tested on 10.9.2 | |
#----------VARIABLES--------- | |
# Manually set ethernet device ID |
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 | |
#----------VARIABLES--------- | |
echo "Checking hard disk ID..." | |
hardDiskID=$(diskutil list | awk '/GUID_partition_scheme/ {print $5}') | |
#---------------------------- | |
#-----------SCRIPT----------- | |
#---------------------------- | |
echo "Checking if Users partition exists..." | |
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 | |
#----------VARIABLES--------- | |
usersUUID=$(diskutil info Users\ HD | grep Volume\ UUID: | awk '{print $3}') | |
# usershHD=$(diskutil list | grep Users | awk '{print $6}') | |
# macintoshHD=$(diskutil list | grep "Macintosh HD" | grep -v "Macintosh HD 1" | awk '{print $7}') | |
#----------FUNCTIONS--------- | |
##################### | |
function createFstab() |
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 | |
#An icon file needs to exist in /usr/local/imaging | |
# Copy the users.icns file to the root of the the Users folder. | |
# Since it is a volume, if you name the file .VolumeIcon.icns, it will change the icon from the default hard drisk | |
# This is mostly to help the end users so they feel like it is a folder and not a hard drive | |
# The icon should also have a small badge to let the tech staff know that it is not a normal folder and that the workflow was successful | |
cp /usr/local/imaging/users.icns /Users/.VolumeIcon.icns |
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 | |
appStoreFolder=$(sudo find /private/var/folders -type f -name "*.pkg") | |
i=0 | |
for package in $appStoreFolder | |
do | |
# Make a hard link of the package in the Downloads folder | |
sudo ln $package ~/Downloads/_MAS_$i.pkg | |
# Increment by one in case there are more .pkgs to save |
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 | |
# URL to pull list of known ad servers from | |
adListURL="http://pgl.yoyo.org/adservers/serverlist.php?hostformat=dnsmasq&showintro=0&mimetype=plaintext" | |
# Address to send ads to | |
piholeIP="127.0.0.1" | |
# Where the list of ad servers are stored once downloaded | |
# Any file in /etc/dnsmasq.d is loaded automatically when the service starts |
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
osascript -e <<EOF 'tell application "System Events" | |
tell process "SecurityAgent" | |
set value of text field 2 of window "Login" to "username" | |
set value of text field 1 of window "Login" to "password" | |
end tell | |
tell application "system events" to keystroke return | |
tell application "system events" to keystroke return | |
end tell' | |
EOF |
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
#!/usr/bin/python | |
# Universal wallpaper script for 10.6 and up | |
from AppKit import NSWorkspace, NSScreen | |
from Foundation import NSURL | |
from platform import mac_ver | |
from subprocess import call | |
from os import system | |
# Set path here for 10.9 | |
picture_path = "/Library/Desktop Pictures/Custom.jpg" |
OlderNewer