xcrun simctl install booted #{.app-path}
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
| // Swift 3 | |
| extension DateFormatter { | |
| public static var iso8601: DateFormatter { | |
| return DateFormatter.iso8601DateFormatter | |
| } | |
| private static let iso8601DateFormatter: DateFormatter = { | |
| let formatter = DateFormatter() | |
| formatter.locale = Locale(identifier: "en_US_POSIX") |
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. Install oh my zsh | |
| http://ohmyz.sh/ | |
| $ sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" | |
| 1. Install powerline fonts | |
| https://github.com/powerline/fonts | |
| 1. download agnoster theme | |
| https://github.com/mbadolato/iTerm2-Color-Schemes/zipball/master |
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 UIKit | |
| public class ScrollableStackView: UIView { | |
| // MARK: Properties | |
| private var didSetupConstraints = false | |
| private lazy var scrollView: UIScrollView = { | |
| let scrollView = UIScrollView(frame: .zero) |
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 UIKit | |
| public protocol NibNameableView: class { | |
| static var nibName: String { get } | |
| } | |
| extension NibNameableView where Self: UIView { | |
| public static var nibName: String { | |
| return String(describing: self) | |
| } |
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 Foundation | |
| public enum ResultType<Value> { | |
| case success(Value) | |
| case failure(Swift.Error) | |
| } | |
| extension ResultType { | |
| public init(value: () throws -> Value) { | |
| do { |
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
| extension CGSize { | |
| func widthScaling(with value: CGFloat) -> CGSize { | |
| return CGSize(width: value, height: (value * height) / width) | |
| } | |
| func heightScaling(with value: CGFloat) -> CGSize { | |
| return CGSize(width: (value * width) / height, height: value) | |
| } | |
| } |
defaults write com.apple.dock persistent-others -array-add '{ "tile-data" = { "list-type" = 1; }; "tile-type" = "recents-tile"; }'killall Dock