This file contains 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
// 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 |
This file contains 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
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" |
This file contains 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
// UIViewController+BackgroundStatusBar.swift | |
// hailadoc-ios | |
// | |
// Created by Gabriele Petronella on 7/16/15. | |
// Copyright (c) 2015 buildo. All rights reserved. | |
// | |
import Foundation | |
extension UIViewController { |
This file contains 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
// 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) |
This file contains 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
@ "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) |
This file contains 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
package project | |
import cats._ | |
import cats.free.Free | |
object Main extends App { | |
import Algebra._ | |
import ConsultationOp._ | |
val c = Consultation(_id = "123", title = "A consultation") |
This file contains 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
#!/bin/bash | |
GITHUB_API=https://api.github.com | |
AUTH_TOKEN= # GITHUB API TOKEN HERE | |
REPO= # REPO NAME HERE | |
URL=${bamboo.buildResultsUrl} | |
SHA=${bamboo.repository.revision.number} | |
SUCCESS_DESCRIPTION="The Bamboo CI build passed" | |
FAILURE_DESCRIPTION="Build #${bamboo.buildNumber} failed" |
This file contains 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
data UnionFindElement valueType = | |
RootElement valueType | | |
ElementWithParent valueType (UnionFindElement valueType) | |
deriving (Eq, Show) |
This file contains 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
var money = | |
"@people: luca gio dani gabro claudio jaja mike paolo\n"+ | |
"@group: luca gio dani gabro claudio jaja\n"+ | |
"@date: debiti e payback\n"+ | |
"~Debiti (Dani 52.13 Luca 356.37 Gabro 13.18) claudio 309.88 gio 28.98 jaja 17.25 mike 64.51\n"+ | |
"15 gio -> dani\n"+ | |
"400 claudio -> gabro\n"+ | |
"10 dani -> jaja\n"+ |
This file contains 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
var userSchema = new Schema( | |
fb_id : String, | |
firstName : String, | |
lastName : String, | |
messages : [{ | |
content : String, | |
positive : Boolean, | |
author : User, | |
created_at : {type : Date, default : Date.now}, | |
updated_at : {type : Date, default : Date.now} |