View How to link Sublime Text Build system to Python 3
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
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 |
View keyboardHeightObservable.swift
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
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 |
View fix-xcode-sdk
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
#!/usr/bin/python | |
# fix-xcode-sdk | |
# Rob Napier <robnapier@gmail.com> | |
# Forked by Thongchai Kolyutsakul <thongchaikol@gmail.com> | |
# (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: |