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 | |
function tryping { | |
ping -t 5 x.x.x.x > /dev/null 2>&1 | |
if [ $? == 0 ]; then exit 0; fi | |
} | |
rm -rf /Library/Preferences/SystemConfiguration/NetworkInterfaces.plist | |
rm -rf /Library/Preferences/SystemConfiguration/preferences.* | |
networksetup -createlocation setup populate |
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 | |
# Script to return full AD user name of last logged in user | |
DOMAIN="enterdomainhere" | |
LASTLOGIN=`defaults read /Library/Preferences/com.apple.loginwindow lastUserName` | |
LASTUSERID=`id -u $LASTLOGIN` | |
if [ $LASTUSERID -gt "1000" ] |
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 | |
echo "backup_home_dirs.sh - v1.0 - ("`date`")" | |
set -e | |
TMPFILE="/tmp/Backup-${DS_SERIAL_NUMBER}-`date "+%Y%m%d"`.dmg" | |
DS_INTERNAL_DRIVE=`system_profiler SPSerialATADataType|awk -F': ' '/Mount Point/ {print $2}'|head -n1` | |
MOUNTPOINT="/Volumes/UserBackups-${DS_SERIAL_NUMBER}" | |
SPARSE="${TMPFILE}.sparseimage" |
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 | |
ORCHARD_DEFAULTS=/Library/Preferences/uk.ac.ox.it.orchard | |
MUNKI_DEFAULTS=/Library/Preferences/ManagedInstalls | |
LOG_FILE=$(defaults read "${MUNKI_DEFAULTS}" LogFile) | |
LOG_DIR=$(dirname "${LOG_FILE}") | |
INSTALL_LOG_MTIME=$(stat -f "%m" "${LOG_DIR}/Install.log") | |
# Only run jamf recon if an Install/Removal has taken place | |
if [ $(defaults read "${ORCHARD_DEFAULTS}" InstallLogMtime) -ne $INSTALL_LOG_MTIME ];then |
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
s/([a-z](?=[A-Z])|[A-Z](?=[0-9]))/$1_/g |
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 | |
exec > >(logger -i -t autopkg-build) 2>&1 | |
BUILD_RECIPE_DIR="/dir/with/autopkg/recipenames" | |
EMAIL_ERRORS_TO='blah@acme.com' | |
my_name=$(basename $0) | |
# Allows us to get exit code of autopkg and not tee | |
set -o pipefail |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>_metadata</key> | |
<dict> | |
<key>created_by</key> | |
<string>ouit0354</string> | |
<key>creation_date</key> | |
<date>2016-02-19T10:40:25Z</date> |
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
#include <FastLED.h> | |
#define DATA_PIN 6 | |
#define COLOR_ORDER GRB | |
#define CHIPSET WS2812B | |
#define NUM_LEDS 60 | |
#define HALF_LEDS NUM_LEDS/2 | |
#define VISUALS 6 | |
#define PALETTES 7 | |
#define BRIGHTNESS 255 |
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
echo <Netboot Set Name> | perl -e 'while (<>){s/(.)/sprintf("%X:",ord($1))/ge;my $len=length()/3;s/:$//;print "\n Length (hex): ".sprintf("%02X",$len)."\n Name (hex): $_\n";}' |
OlderNewer