react + redux + RR
It uses https://gist.github.com/iNikNik/3c1b870f63dc0de67c38 for stores and actions.
1) create redux
const redux = createRedux(state);2) get requireAccess func => bindCheckAuth to redux
| import UIKit | |
| extension String { | |
| var hexColor: UIColor? { | |
| let hex = self.stringByTrimmingCharactersInSet(NSCharacterSet.alphanumericCharacterSet().invertedSet) | |
| var int = UInt32() | |
| guard NSScanner(string: hex).scanHexInt(&int) else { | |
| return nil | |
| } | |
| let a, r, g, b: UInt32 |
react + redux + RR
It uses https://gist.github.com/iNikNik/3c1b870f63dc0de67c38 for stores and actions.
1) create redux
const redux = createRedux(state);2) get requireAccess func => bindCheckAuth to redux
| // A thing I want to do | |
| // This flow only involves **one** promise, for example an ajax call | |
| // None of the subsequent `then` or `catch` calls, return new promises. | |
| var explode = false; | |
| var promise = new Promise(function(resolve, reject) { | |
| if (explode) { |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| // | |
| // AppDelegate.swift | |
| // pushtest | |
| // | |
| // Created by sawapi on 2014/06/08. | |
| // Copyright (c) 2014年 sawapi. All rights reserved. | |
| // | |
| // iOS8用 | |
| import UIKit |
| route = 8.0.0.0/255.0.0.0 | |
| route = 58.0.0.0/255.0.0.0 | |
| route = 23.0.0.0/255.0.0.0 | |
| route = 117.0.0.0/255.0.0.0 | |
| route = 199.0.0.0/255.0.0.0 | |
| route = 190.0.0.0/255.0.0.0 | |
| route = 198.0.0.0/255.0.0.0 | |
| route = 173.0.0.0/255.0.0.0 | |
| route = 174.0.0.0/255.0.0.0 | |
| route = 168.0.0.0/255.0.0.0 |
| NSURLConnection | NSURLSession | |
| ------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------- | |
| NSURLConnectionDelegate connectionShouldUseCredentialStorage: | | |
| ------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------- | |
| NSURLConnectionDelegate connection:willSendRequestForAuthenticationChallenge: | NSURLSessionDelegate URLSession:didReceiveChallenge:completionHandler: | |
| | N |
Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.
For the sake of this example, let’s pretend the subfolder containing your site is named dist.
Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).