Skip to content

Instantly share code, notes, and snippets.

public func continueToLogin() {
viewController?.performSegue(withIdentifier: ViewController.Segues.presentLogin, sender: wireNextRouter ({ target in
return try LoginScreenRouter.build(from: target, services: LoginScreenRouter.Services.External(loginService: self.services.loginService))
}))
}
public protocol Router {
associatedtype ViewController: UIViewController
/// Returns view controller that is managing the view
/// presented by the router
var viewController: ViewController? { get }
}
extension Router {
MyApplication
+ App
| // This is your main application bundle
| + Routers
| | // Here are all of your routers located (your wireframe)
| |> MainScreenRouter.swift
| |> HomeScreenRouter.swift
| |> AnotherScreenRouter.swift
|> AppDelegate.swift
+ AppUI
import Foundation
extension UIViewController {
func wire(segue: UIStoryboardSegue, with sender: Any?) {
guard let activationClosure = sender as? (UIViewController) -> Void else {
fatalError("Architectural failure. Can't prepare router")
}
activationClosure(segue.destination)
}
}
import Foundation
struct DelayedActions {
let queue: DispatchQueue
private var shouldDelay: Bool = true
private var closures: [() -> Void] = []
init() {
queue = DispatchQueue.main
// Example usage:
// class A {
// lazy var event = Observable(self)
// ...
// func doSomeStuff() {
// ...
// event.fire()
// }
// }

Keybase proof

I hereby claim:

  • I am morpheby on github.
  • I am morpheby (https://keybase.io/morpheby) on keybase.
  • I have a public key whose fingerprint is 357D D960 37C7 626E DE07 C5E3 6575 27D1 84B0 4D00

To claim this, I am signing this object:

/*
* histogram.cpp
* Creates histogram of byte distribution in file
*
* Created by Илья Михальцов on 2014-05-27.
* Copyright 2014 Илья Михальцов. All rights reserved.
*/
// g++ -fopenmp -std=gnu++11 -O2 histogram.cpp -o histogram
Index: tools/macosx/Makefile.am
===================================================================
--- a/tools/macosx/Makefile.am (revision 220)
+++ b/tools/macosx/Makefile.am (working copy)
@@ -10,17 +10,18 @@
)
install-exec-local:
- $(INSTALL) -d $(DESTDIR)/System/Library/Filesystems/fuse-ext2.fs
- $(INSTALL) -d $(DESTDIR)/System/Library/Filesystems/fuse-ext2.fs/Support
Index: tools/macosx/prefpane/fuse-ext2.xcodeproj/project.pbxproj
===================================================================
--- a/tools/macosx/prefpane/fuse-ext2.xcodeproj/project.pbxproj (revision 220)
+++ b/tools/macosx/prefpane/fuse-ext2.xcodeproj/project.pbxproj (working copy)
@@ -164,9 +164,15 @@
/* Begin PBXProject section */
089C1669FE841209C02AAC07 /* Project object */ = {
isa = PBXProject;
+ attributes = {
+ };