- Introduction to Functional Programming Johannes Weiß - https://vimeo.com/100786088
- ReactiveCocoa at MobiDevDay Andrew Sardone - https://vimeo.com/65637501
- The Future Of ReactiveCocoa Justin Spahr-Summers - https://www.youtube.com/watch?v=ICNjRS2X8WM
- Enemy of the State Justin Spahr-Summers - https://www.youtube.com/watch?v=7AqXBuJOJkY
- WWDC 2014 Session 229 - Advanced iOS Application Architecture and Patterns Andy Matuschak - https://developer.apple.com/videos/play/wwdc2014/229/
- Functioning as a Functionalist Andy Matuschak - https://www.youtube.com/watch?v=rJosPrqBqrA
- Controlling Complexity in Swift Andy Matuschak - https://realm.io/news/andy-matuschak-controlling-complexity/
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 | |
import PerfectLib | |
import PerfectHTTP | |
import PerfectHTTPServer | |
class FlightsDetailController { | |
func handleFlightsDetailRequest(request: HTTPRequest, response: HTTPResponse) { | |
do { | |
guard let flightId: Int = Int(request.urlVariables["id"] ?? "") else { |
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 | |
import PerfectLib | |
import PerfectHTTP | |
import PerfectHTTPServer | |
class FlightsListController { | |
func handleFlightsListRequest(request: HTTPRequest, response: HTTPResponse) { | |
do { | |
try response.setBody(json: getFlightsList()) |
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 | |
func getFlightsList() -> [[String: Any]] { | |
return [ | |
["id":1001, | |
"flightNumber": "AI323", | |
"company": "Air India", | |
"fare": 27637, | |
"stops": 0, | |
"departure":"06:30", |
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
@main | |
struct BoxOfficeWidget: Widget { | |
let kind: String = "BoxOfficeWidget" | |
var body: some WidgetConfiguration { | |
StaticConfiguration(kind: kind, provider: Provider()) { entry in | |
BoxOfficeWidgetEntryView(entry: entry) | |
} | |
.configurationDisplayName("Box Office") | |
.description("Box office collection of latest movies") |
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
#!/usr/bin/env bash | |
rm -rf "${HOME}/Library/Caches/CocoaPods" | |
rm -rf "`pwd`/Pods/" | |
pod update |
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
// Basic Types | |
let id: number = 5 | |
let company: string = 'Traversy Media' | |
let isPublished: boolean = true | |
let x: any = 'Hello' | |
let ids: number[] = [1, 2, 3, 4, 5] | |
let arr: any[] = [1, true, 'Hello'] | |
// Tuple |
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
disabled_rules: # rule identifiers to exclude from running | |
- variable_name | |
- nesting | |
- function_parameter_count | |
opt_in_rules: # some rules are only opt-in | |
- control_statement | |
- empty_count | |
- trailing_newline | |
- colon | |
- comma |
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 | |
import Combine | |
class SplashViewController: UIViewController { | |
@IBOutlet weak var activityIndicator: UIActivityIndicatorView! | |
private var cancellables = Set<AnyCancellable>() | |
var launchDataDispatchGroup: DispatchGroup = DispatchGroup() | |
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 | |
import Combine | |
class SignupViewController: UIViewController { | |
@IBOutlet weak var signupLabel: UILabel! | |
@IBOutlet weak var errorLabel: UILabel! | |
@IBOutlet weak var usernameTextField: UITextField! | |
@IBOutlet weak var passwordTextField: UITextField! | |
private var cancellables = Set<AnyCancellable>() |