Rails - http://www.rubydoc.info/gems/rubocop/RuboCop/Cop/Rails
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
public protocol NSCodingKey: RawRepresentable { } | |
extension NSCoder{ | |
func encodeObject<T where T:NSCodingKey, T.RawValue == String>(objv: AnyObject?, forKey key: T) { | |
self.encodeObject(objv, forKey: key.rawValue) | |
} | |
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
func viewDidLoad() { | |
super.viewDidLoad() | |
let currentEnvironment = EnvironmentManager.currentEnvironment() | |
self.selectSegmentForEnvironment(currentEnvironment) | |
// Do any additional setup after loading the view. | |
} | |
func selectSegmentForEnvironment(environment:Environment) { |
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
func ingest<T:Ingestable, U where U:Persistable, U:SwiftyMeragable, U:NSManagedObject>(ingestables: [T]?, completion: ( persistedObjects:[U] )->Void) { | |
} | |
func ingest<T where T:Ingestable, T.IngestedType:Persistable, T.IngestedType:SwiftyMeragable, T.IngestedType:NSManagedObject>(ingestables: [T]?, completion: (( persistedObjects:[NSManagedObjectID] )->Void)? = nil) { | |
} |
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
public class AtomicProperty<T:Any> { | |
private var mutex: pthread_mutex_t = { | |
var mutex = pthread_mutex_t() | |
pthread_mutex_init(&mutex, nil) | |
return mutex | |
}() | |
private var _value: T | |
public var value: T { |
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 OrderPlacementService | |
def fetch_user_billing_info(params) | |
HashParamsChecker.check_params( | |
{:inputs => { :pre_user_id => 13 } | |
}, | |
params | |
) | |
#... |
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
platform :ios, '9.0' | |
use_frameworks! | |
inhibit_all_warnings! | |
workspace 'Food52.xcworkspace' | |
pod 'Alamofire', '~>4.0' | |
pod 'CocoaLumberjack/Swift', '~>3.0' | |
pod 'PINRemoteImage','~> 2.0' |
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
var str = "Hello, playground" | |
let wire1 = "R1004,U520,R137,D262,L403,U857,R50,U679,R788,D98,L717,D1,R367,U608,L125,U703,L562,D701,L718,U357,R742,D860,R557,D117,R950,U546,L506,U836,R951,D460,L38,U893,L1,D217,R262,D950,R239,U384,R971,D289,R323,U878,L525,U687,L831,U523,R94,D33,L879,D318,R633,D775,R879,D351,L120,D8,R31,U49,R328,D598,L380,D160,R261,D716,R459,U533,L444,U412,L326,U93,L193,D621,R236,U769,L319,D885,L559,U509,L62,U321,L667,D505,R556,U159,L5,U126,L262,D946,L168,U491,L56,D831,R926,U926,R562,D270,R785,U436,R852,D629,R872,U716,R549,U435,R462,U191,R318,U91,L637,D682,R647,D53,L789,D725,R312,D366,L287,U29,R85,D657,R88,U300,R795,U378,R800,D391,L594,U791,R205,U352,L510,D975,R47,D311,R319,U579,R214,D112,R996,U874,R328,D578,R37,U689,L543,U16,L580,D230,L714,D58,L580,D658,R218,U535,R149,U996,L173,D316,L90,D372,L364,U700,L60,D70,L250,U276,R580,U505,L682,U943,R336,U847,R810,U963,R874,D740,R732,D328,R926,D447,R638,D102,R696,U211,L594,D354,R384,U81,L884,U916,L168,U759,R631,D702,L598,D382,L647,U642,R537,U53,R897,U954, |
OlderNewer