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
| // | |
| // Copyright blah-blah | |
| // | |
| // --- | |
| // Group of assignments | |
| int x = 5; | |
| int longVariableName = 444; | |
| unsigned long long anotherVar = 3; |
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
| def platform_call(platform_name, &block) | |
| puts "SupportedPlatforms.verify!(platform_name)" | |
| puts "self.current_platform = platform_name" | |
| block.call | |
| puts "self.current_platform = nil" | |
| end | |
| def platform_yield(platform_name, &block) |
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
| @implementation Floats | |
| static inline BOOL fequal(double a, double b) { | |
| return (fabs(a - b) < FLT_EPSILON || fabs(a - b) < FLT_MIN); | |
| } | |
| + (void)test { | |
| CGFloat x = NSNotFound; | |
| NSLog(@"%f = %ld", x, (long)NSNotFound); |
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
| github "alamofire/Alamofire" ~> 4.6.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
| import Alamofire | |
| Alamofire.request("http://httpbin.org/get") | |
| .responseJSON { response in | |
| print(response) // Result of response serialization | |
| } | |
| print("Done") |
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 :osx, "10.10" | |
| use_frameworks! | |
| plugin "cocoapods-rome" | |
| target :dummy do | |
| pod "Alamofire", "~> 4.6.0" | |
| end | |
| post_install do |installer| | |
| swift_version = `cat .swift-version`.strip |
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
| # Build the frameworks | |
| pod install |
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
| github "alamofire/Alamofire" ~> 4.6.0 |