I hereby claim:
- I am gabro on github.
- I am gabro (https://keybase.io/gabro) on keybase.
- I have a public key ASBZl9AJO-rUEOoKZ98kEhpqYfcs3vlfuC1DA_bwE0FdRgo
To claim this, I am signing this object:
| /* @flow */ | |
| // A simplified representation of types using phantom types (so that we store the Type information both at value and type level) | |
| class Type<T> {}; | |
| class StringT extends Type<string> {} | |
| class NumberT extends Type<number> {} | |
| // A schema for a User | |
| const User = { | |
| name: new StringT(), |
I hereby claim:
To claim this, I am signing this object:
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
| import Photos | |
| import MobileCoreServices | |
| class AssetPicker: NSObject, UIImagePickerControllerDelegate, UINavigationControllerDelegate, UIDocumentPickerDelegate, UIDocumentMenuDelegate { | |
| static let sharedInstance = AssetPicker() | |
| private lazy var cameraPicker: UIImagePickerController = { | |
| let cameraPicker = UIImagePickerController() |
| package project | |
| import cats._ | |
| import cats.free.Free | |
| object Main extends App { | |
| import Algebra._ | |
| import ConsultationOp._ | |
| val c = Consultation(_id = "123", title = "A consultation") |
| @ "42".toInt | |
| res0: Int = 42 | |
| @ implicit object Foo extends Function1[String, Int] { | |
| def apply(s: String) = s.toInt | |
| } | |
| defined object Foo | |
| @ "42”.toInt | |
| // BOOM (infinite recursion) |
| // Create a ViewController automatically wrapped in a UINavigationController | |
| // returns the viewController and a Signal<Patient, NoError> | |
| let (profileVC, signal) = EditPersonalInfoViewController.wrappedInNavigationController(patient: patient) | |
| // observe the signal. When a new Patient is produced, update the view | |
| // dismiss the view controller whenever the signal is completed (i.e. modifications have been saved or interaction has been canceled) | |
| signal.observe(next: reloadViewForPatient, completed: dismissViewController) | |
| // let the game being | |
| self.presentViewController(profileVC, animated: true, completion: nil) |
| // UIViewController+BackgroundStatusBar.swift | |
| // hailadoc-ios | |
| // | |
| // Created by Gabriele Petronella on 7/16/15. | |
| // Copyright (c) 2015 buildo. All rights reserved. | |
| // | |
| import Foundation | |
| extension UIViewController { |
| Pod::Spec.new do |s| | |
| s.name = "ReactiveCocoa" | |
| s.version = "3.0-beta.9" | |
| s.summary = "A framework for composing and transforming streams of values" | |
| s.description = <<-DESC | |
| ReactiveCocoa (RAC) is an Objective-C framework for Functional Reactive Programming. It provides APIs for composing and transforming streams of values. | |
| DESC | |
| s.homepage = "https://github.com/ReactiveCocoa/ReactiveCocoa" | |
| s.license = "MIT" |
| // let's create our status bar background view | |
| let statusBar = UIView() | |
| // set the navigation bar color to white (assuming `navController` is our `UINavigationController`) | |
| navController.navigationBar.barTintColor = UIColor.whiteColor() | |
| // turn off the autoresizing mask, since we're using autolayout | |
| statusBarBg.setTranslatesAutoresizingMaskIntoConstraints(false) | |
| // set a background color for the status bar |