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
1. Go to Sublime Text to: Tools -> Build System -> New Build System | |
and put the next lines: | |
{ | |
"cmd": ["python3", "-u", "$file"], | |
"file_regex": "^[ ]File \"(...?)\", line ([0-9]*)", | |
"selector": "source.python" | |
} | |
Then save it with a meaningful name like: python3.sublime-build |
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
import RxSwift // Version 3.2.0 | |
import RxCocoa // Version 3.2.0 | |
typealias KeyboardHeightInfo = (CGFloat, TimeInterval) | |
func keyboardHeight() -> Driver<KeyboardHeightInfo> { | |
return Observable | |
.from([ | |
NotificationCenter.default.rx.notification(NSNotification.Name.UIKeyboardWillShow) | |
.map { notification -> KeyboardHeightInfo in |
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
#!/usr/bin/python | |
# fix-xcode-sdk | |
# Rob Napier <[email protected]> | |
# Forked by Thongchai Kolyutsakul <[email protected]> | |
# (https://gist.github.com/hlung/6806651) | |
# Script to link in all your old SDKs every time you upgrade Xcode | |
# Create a directory called /SDKs (or modify source_path). | |
# Under it, put all the platform directories: |