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
function isPortrait() { | |
return Math.abs(window.orientation) / 90 !== 1); | |
} |
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
// note: if you don't need IE8 support, you can just do | |
// return image.tags.indexOf('TAGNAME') !== -1; | |
filter: function(image) { | |
var foundTag = false, tags = image.tags; | |
for(var i=0,len=tags.length; i<len && !foundTag; i++) { | |
if (tags[i] === 'THE_TAG_NAME') foundTag = true; | |
}; | |
return foundTag; |
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
sudo chmod ugo-x /usr/libexec/path_helper |
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
# app-specific. replace BUNDLE_NAME with app bundle (ex: com.sublimetext.2) | |
defaults write BUNDLE_NAME ApplePressAndHoldEnabled -bool false | |
# global | |
defaults write -g ApplePressAndHoldEnabled -bool false |
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
source 'https://rubygems.org' | |
ruby '2.0.0' | |
gem 'rack' |
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
^[\.+]*\/+.*\.[a-zA-Z0-9]+$ | |
# Matches | |
/Users/stevenschobert/Documents/project/tmp/tmp-8205.txt | |
../somepath.txt | |
./sompat/h.d | |
./Something with spaces/word.txt | |
# Does not match | |
../sompath |
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
grep -l -R -v "$(date '+%b %e')" * | xargs rm |
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
find in/ -name '*.haml' | xargs basename -s .haml | xargs -I % bundle exec haml in/%.haml out/%.html |
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
testCrashlyticsPresent='try\n set crashlytics to application "Crashlytics"\n properties of crashlytics\non error errorMessage\n if errorMessage contains "application" then\n error\n else\n return true\n end if\nend try\n' | |
if $(echo $testCrashlyticsPresent | /usr/bin/osascript 2>/dev/null); then | |
./Crashlytics.framework/run CRASHLYTICS_KEY | |
else | |
echo "Crashlytics isn't installed. Skipping." | |
exit 0 | |
fi |
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
try | |
set targetApp to application "APPNAME" | |
properties of targetApp | |
on error errorMessage | |
if errorMessage contains "application" then | |
error | |
else | |
return true | |
end if | |
end try |
OlderNewer