Skip to content

Instantly share code, notes, and snippets.

View djtech42's full-sized avatar

Dan Turner djtech42

View GitHub Profile
@djtech42
djtech42 / preventSleep.sh
Created October 11, 2015 03:48
Prevent Mac From Sleeping For One Hour (3,600 Seconds)
caffeinate -u -t 3600
@djtech42
djtech42 / airportLink.sh
Created October 11, 2015 03:46
Create a Symbolic Link to Airport Command Line Tool in OS X
@djtech42
djtech42 / openMASUpdates.sh
Created October 11, 2015 02:36
Open Mac App Store to Updates Tab
open macappstore://showUpdatesPage
@djtech42
djtech42 / logicproxScripterEvents
Created October 11, 2015 01:21
Logic Pro X MIDI Scripter Javascript Events
//-----------------------------------------------------------------------------
// EventTypes.js
//-----------------------------------------------------------------------------
// required event class definitions for MIDI events
//-----------------------------------------------------------------------------
// Event : base class for all events
//-----------------------------------------------------------------------------
@djtech42
djtech42 / pythonPath.py
Created September 28, 2015 06:30
Get Python Install Path In Interpreter
import sys
sys.executable
@djtech42
djtech42 / countNum
Created September 23, 2015 03:37
Apple Numbers Value in Column Frequency (for Histogram)
COUNTIF(//column, //constant)
Ex. COUNTIF(A, 3)
//Count frequency that 3 shows up in column
COUNTIF(//column, //cell)
Ex. COUNTIF(A, C3)
//Count frequency that value of cell C3 shows up in column
@djtech42
djtech42 / createLocalizedStringsFile.sh
Created August 12, 2015 20:39
Generate Localizable.strings File for Project
#!/bin/bash
genstrings -o en.lproj *.m -v
@djtech42
djtech42 / xcodeInstances.sh
Last active August 29, 2015 14:27
Warn if there is more than one instance of Xcode running (Ex. Xcode and Xcode Beta are running at the same time)
#!/bin/bash
NUMOFLINES=`pgrep -ax Xcode | wc -l `
if [ $NUMOFLINES -eq 1 ]
then
echo "Everything's fine. Only one instance of Xcode running."
elif [ $NUMOFLINES -eq 0 ]
then
echo "No instances of Xcode are running."
else
echo "Warning! $NUMOFLINES Xcode instances running"
@djtech42
djtech42 / icloudAlias.sh
Last active August 18, 2017 10:35
Create Alias for iCloud Drive
#!/bin/bash
ln -s ~/Library/Mobile\ Documents/com\~apple\~CloudDocs/ iCloud
@djtech42
djtech42 / largeCacheFinder.sh
Last active August 29, 2015 14:27
Show Largest Caches in OS X User Library
#!/bin/bash
du -s ~/Library/Caches/* | sort -n -r