This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
This file contains hidden or 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
| /** | |
| * Request class for making HTTP requests. | |
| * | |
| * new Request('http://api.com', { | |
| * method: 'get', | |
| * headers: {} | |
| * }).send(function(res) {}); | |
| */ | |
| function Request(url, opts) { | |
| opts = opts || {}; |
This file contains hidden or 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
| func camelCaseString(source: String) -> String { | |
| if contains(source, " ") { | |
| let first = source.substringToIndex(advance(source.startIndex, 1)) | |
| let cammel = NSString(format: "%@", (source as NSString).capitalizedString.stringByReplacingOccurrencesOfString(" ", withString: "", options: nil, range: nil)) as String | |
| let rest = dropFirst(cammel) | |
| return "\(first)\(rest)" | |
| } else { | |
| let first = (source as NSString).lowercaseString.substringToIndex(advance(source.startIndex, 1)) | |
| let rest = dropFirst(source) | |
| return "\(first)\(rest)" |
This file contains hidden or 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
| var count = 0; | |
| var feed = new Instafeed({ | |
| filter: function(image) { | |
| count += 1; | |
| if (count % 4 === 0) { | |
| image.customTagOpen = '<div>'; | |
| image.customTagClose = '</div>'; | |
| } else { | |
| image.customTagOpen = ''; |