Skip to content

Instantly share code, notes, and snippets.

View NatashaTheRobot's full-sized avatar

Natasha Murashev NatashaTheRobot

View GitHub Profile
@NatashaTheRobot
NatashaTheRobot / StoryboardController.swift
Created April 9, 2016 15:56 — forked from garohussenjian/SegueInteractor.swift
Bind Swift closure to StoryboardSegues (Master-Detail example)
// StoryboardController.swift
// SegueIdentifier enumerates just the segue ID strings in the storyboard. VC's don't switch on this one...
enum SegueIdentifier: String {
case ShowDetail
}
// SegueInteractor binds closures to segues. VC's can switch on this instead!
enum SegueInteractor {
case ShowDetail((EventEntity) -> Void)
import Foundation
protocol Currency { static var sign: String { get } }
enum GBP: Currency { static let sign = "£" }
enum EUR: Currency { static let sign = "€" }
enum USD: Currency { static let sign = "$" }
protocol _Money {
associatedtype C: Currency
var amount: NSDecimalNumber { get }
protocol AgeClasificationProtocol {
var age: Int { get }
func agetype() -> String
}
class Person {
var firstname: String
var lastname: String
var age: Int
@NatashaTheRobot
NatashaTheRobot / psql
Created July 21, 2012 17:05 — forked from rubyonrailstutor/psql
psql code
development:
adapter: postgresql
encoding: unicode
database: url_development
pool: 5
username: jd
password:
host: localhost
port: 5432