most of these require logout/restart to take effect
# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false
# Set a shorter Delay until key repeat| import UIKit | |
| final class ReusableCollectionViewDataSource<T, V>: NSObject, | |
| UICollectionViewDataSource where V: ReusableCollectionViewCell<T> { | |
| typealias ConfigureCell = (T, V) -> Void | |
| var models: [T] | |
| private let configureCell: ConfigureCell |
| jobs: | |
| test: | |
| name: Test | |
| runs-on: macOS-latest | |
| strategy: | |
| matrix: | |
| destination: ['platform=iOS Simulator,OS=13.3,name=iPhone 11'] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@master |
| jobs: | |
| lint: | |
| test: | |
| needs: lint | |
| build: | |
| needs: [lint, test] |
| name: CI | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - develop | |
| - feature/* | |
| - master |
| import UIKit | |
| extension UIImage { | |
| class func imageWithColor(color: UIColor, size: CGSize=CGSize(width: 1, height: 1)) -> UIImage { | |
| UIGraphicsBeginImageContextWithOptions(size, false, 0) | |
| color.setFill() | |
| UIRectFill(CGRect(origin: CGPoint.zero, size: size)) | |
| let image = UIGraphicsGetImageFromCurrentImageContext() | |
| UIGraphicsEndImageContext() | |
| return image! |
| let subject: PublishSubject<Void> = PublishSubject() | |
| lazy private(set) var items: Observable<[Item]> = self.setupItems() | |
| fileprivate func setupItems() -> Observable<[Item]> { | |
| return self.reloadTrigger | |
| .asObservable() | |
| .debounce(0.3, scheduler: MainScheduler.instance) | |
| .flatMapLatest { (_) -> Observable<[Film]> in | |
| return API.instance.FetchItems() | |
| } |
| enum Action { | |
| case UpdateLocation | |
| case FailWithError | |
| } | |
| func updateLocationAction()->Observable<CLLocation> { | |
| return create { observer in | |
| self.locationManager.rx_didUpdateLocations.take(1).subscribe { event in | |
| switch event { | |
| case .Next(let value): |
| $ git submodule add https://github.com/ReactiveCocoa/ReactiveCocoa | |
| $ cd ReactiveCocoa | |
| $ checkout swift2 | |
| $ script/bootstrap |
| language: objective-c | |
| osx_image: xcode7 | |
| script: | |
| - xctool -workspace TestTravis.xcworkspace -scheme TestTravis -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO | |
| - xctool test -workspace TestTravis.xcworkspace -scheme TestTravisTests -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO | |
| before_install: | |
| - gem i cocoapods --no-ri --no-rdoc | |
| - gem i slather --no-ri --no-rdoc |