Skip to content

Instantly share code, notes, and snippets.

View djtech42's full-sized avatar

Dan Turner djtech42

View GitHub Profile
@djtech42
djtech42 / gemList
Created January 11, 2016 08:31
Gem List
activesupport (4.2.5)
addressable (2.4.0, 2.3.8)
babosa (1.0.2)
bigdecimal (1.2.7, 1.2.0)
bropages (0.1.0)
cert (1.2.7)
certified (1.0.0)
CFPropertyList (2.3.2, 2.2.8)
chunky_png (1.3.5)
claide (0.9.1)
@djtech42
djtech42 / brewList
Created January 11, 2016 08:19
Brew List
ack
archey
autoconf
automake
bash
binutils
brew-gem
cmatrix
cmu-pocketsphinx
cmu-sphinxbase
@djtech42
djtech42 / stringOptional.rb
Created December 3, 2015 15:55
Function that returns a string with added grouping notation if it exists
def stringOptional(string, preceding="", succeeding="")
unless string.nil?
return preceding + string + succeeding
else
return ""
end
end
@djtech42
djtech42 / finderAlias
Created November 28, 2015 20:52
Create Terminal Alias for Opening New Finder Window at Current Directory
alias Finder='open -a Finder ./'
@djtech42
djtech42 / terminalStopwatch.sh
Created October 11, 2015 05:10
Stopwatch in Terminal (start and then use Ctrl-C to stop and get time)
# Start
time cat
# Ctrl-C to stop
@djtech42
djtech42 / establishedConnections.sh
Last active October 11, 2015 03:53
List open TCP and UDP Ports and Applications Using Them
lsof -i | grep ESTABLISHED
@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 / openMASUpdates.sh
Created October 11, 2015 02:36
Open Mac App Store to Updates Tab
open macappstore://showUpdatesPage
@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