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
| //: Playground - noun: a place where people can play | |
| import Cocoa | |
| protocol Emptiable { | |
| static var emptyValue: Self { get } | |
| } | |
| extension Emptiable where Self: Equatable { | |
| var nonEmptyValue: Self? { |
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
| //: Playground - noun: a place where people can play | |
| import Cocoa | |
| enum Enum { | |
| case SimpleCase | |
| case AssociatedValue(String) | |
| case AnotherAssociated(Int) | |
| } | |
| extension Enum { |
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 Cocoa | |
| // My JSON Framework | |
| protocol NinoScriptJSON { | |
| init(json:String) throws | |
| init(any:AnyObject) throws | |
| } | |
| extension NinoScriptJSON { | |
| init(json:String) throws { | |
| let data = json.dataUsingEncoding(NSUTF8StringEncoding)! |
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
| module Helpers | |
| def arguments(method:, binding:) | |
| method.parameters.inject({}) do |args, (type, name)| | |
| args[name] = { | |
| type:type, | |
| value:binding.eval(name.to_s) | |
| } | |
| args | |
| end | |
| end |
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
| " Vim Pathogen | |
| runtime bundle/vim-pathogen/autoload/pathogen.vim | |
| call pathogen#infect() | |
| call pathogen#helptags() | |
| " General Settings | |
| set expandtab | |
| set tabstop=4 | |
| set shiftwidth=4 | |
| set softtabstop=4 |
NewerOlder