A ZSH theme optimized for people who use:
- Solarized
- Git
- Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)
For Mac users, I highly recommend iTerm 2 + Solarized Dark
| #!/bin/bash | |
| printf '\e[1;40;92m' | |
| clear | |
| printf "All TNT releases are provided\n\tfree of charge for educational and uncommercial reasons.\n" | |
| printf "Все релизы TNT предоставляются\n\tбезвозмездно для образовательных и некоммерческих целей.\n" | |
| echo "" | |
| echo "Press ENTER if you agree or close this window!" | |
| echo "Нажмите ENTER, если вы согласны, или закройте окно!" | |
| read ok | |
| echo "Please wait..." |
| import RxSwift // Version 3.2.0 | |
| import RxCocoa // Version 3.2.0 | |
| func keyboardHeight() -> Observable<CGFloat> { | |
| return Observable | |
| .from([ | |
| NotificationCenter.default.rx.notification(NSNotification.Name.UIKeyboardWillShow) | |
| .map { notification -> CGFloat in | |
| (notification.userInfo?[UIKeyboardFrameBeginUserInfoKey] as? NSValue)?.cgRectValue.height ?? 0 | |
| }, |
| <key>NSAppTransportSecurity</key> | |
| <dict> | |
| <key>NSAllowsArbitraryLoads</key> | |
| <true/> | |
| </dict> |
| NEW_VER="0.33.1" | |
| POD_VER=`pod --version 2>/dev/null`|| POD_VER=`~/.rbenv/shims/pod --version 2>/dev/null` | |
| if [[ "$POD_VER" != *$NEW_VER ]]; then | |
| echo "error: WTF! You MUST upgrade cocoapods!!!" | |
| exit 1 | |
| fi |
| #!/bin/sh | |
| RUBY=`which ruby` | |
| if [[ $RUBY = '/usr/bin/ruby' ]] ; then | |
| echo "error: You must run the following command from the command-line." | |
| echo "sudu gem pod install" | |
| else | |
| if [[ -e 'Podfile' ]]; then | |
| gem pod install |
| sys_rb_usr=/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr | |
| sdk_rb_usr=`xcode-select -p`/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr | |
| sudo cp -r $sdk_rb_usr/include $sys_rb_usr/include |
| // | |
| // StickyHeaderLayout.h | |
| // Wombat | |
| // | |
| // Created by Todd Laney on 1/9/13. | |
| // Copyright (c) 2013 ToddLa. All rights reserved. | |
| // | |
| // Modified from http://blog.radi.ws/post/32905838158/sticky-headers-for-uicollectionview-using THANKS! | |
| // |
3 比 2 要慢不少, 囧rz.