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
# Xcode | |
build/* | |
*.pbxuser | |
*.mode1v3 | |
*.mode2v3 | |
*.perspectivev3 | |
*.xcworkspace | |
xcuserdata | |
profile |
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
- (void)insertString:(NSString *)inputKey | |
{ | |
// Insert text (doing delegate calls appropiately) | |
NSRange changeRange = target.selectedRange; | |
if (!target.delegate || ([target.delegate respondsToSelector:@selector(textView:shouldChangeTextInRange:replacementText:)] && | |
[target.delegate textView:target shouldChangeTextInRange:changeRange replacementText:inputKey])) { | |
// MarkedText could happen in multi-stage input languages | |
// In iOS5 several methods of UITextInput and UIKeyInput are badly implemented in UITextView | |
// setMarkedText:selectedRange: method seems to delete current markedText. | |
// Unmarking the text before inserting it is better than nothing. |
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
- (BOOL)_isShifted | |
{ | |
BOOL res = NO; | |
Class uiKeyboardImpl = NSClassFromString(@"UIKeyboardImpl"); | |
if ([uiKeyboardImpl respondsToSelector:@selector(activeInstance)]) { | |
id activeKeyboard = [uiKeyboardImpl performSelector:@selector(activeInstance)]; | |
if ([activeKeyboard respondsToSelector:@selector(isShifted)]) { | |
res = ((BOOL)[activeKeyboard performSelector:@selector(isShifted)]); | |
} | |
} |
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 and dismiss the UIAutocorrectionInlinePrompt view | |
// target is an instance of UITextView | |
NSArray *textviewSubviews = [target subviews]; | |
NSInteger correctionViewIndex = [textviewSubviews indexOfObjectPassingTest:^BOOL(id obj, NSUInteger idx, BOOL *stop) { | |
if ([[[obj class] description] isEqualToString:@"UIAutocorrectInlinePrompt"]) { | |
*stop = YES; | |
return YES; | |
} else { | |
return NO; | |
} |
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
Show hidden characters
{ | |
"cmd": ["jsl", "-process", "$file", "-nologo", "-nocontext", "-nofilelisting"], | |
"file_regex": "^(.+\\.js)\\((\\d+)\\): (.+)$", | |
"selector": "source.js", | |
"osx": { | |
"path": "/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin" | |
} | |
} | |
// Above settings are for output of the form: |
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
{ | |
"cmd": ["tsc","$file"], | |
"file_regex": "^(.+) \\((\\d+),(\\d+)\\): (.+)$", | |
"selector": "source.ts", | |
"osx": { | |
"path": "/usr/local/bin:/opt/local/bin" | |
} | |
} |
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
export CLICOLOR=1 | |
export LSCOLORS=gxBxhxDxfxhxhxhxhxcxcx | |
export LS_COLORS=$LSCOLORS | |
export LC_ALL=en_US.UTF-8 | |
export LANG=en_US.UTF-8 | |
#PS1='\[\e[0;33m\][\h:\W \u]$\[\e[m\] ' | |
PS1='\[\e[0;33m\][\w]$\[\e[m\] ' |
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
# Check xcode-select to check Xcode + Developer tools are installed | |
command -v xcode-select >/dev/null 2>&1 || { echo >&2 "Make sure Xcode together with xcode-select command is installed. Aborting."; exit 1; } | |
XCODE_PATH=$(xcode-select --print-path 2>&1) | |
echo $XCODE_PATH |
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 | |
# | |
# Description: | |
# Installs the given *.docset so it is visible by Xcode, Dash, etc | |
# | |
# Usage: | |
# installDocumentation path/to/documentation.docset | |
# | |
# Check parameters |