Get it from the App Store.
In XCode's Preferences > Downloads you can install command line tools.
| // on error the server sends JSON | |
| /* | |
| { "error": { "data": { "message":"A thing went wrong" } } } | |
| */ | |
| // create model classes.. | |
| public class ErrorResponse { | |
| Error error; | |
| # Change YOUR_TOKEN to your prerender token | |
| # Change example.com (server_name) to your website url | |
| # Change /path/to/your/root to the correct value | |
| server { | |
| listen 80; | |
| server_name example.com; | |
| root /path/to/your/root; | |
| index index.html; |
| def osascript(script) | |
| system 'osascript', *script.split(/\n/).map { |line| ['-e', line] }.flatten | |
| end | |
| osascript <<-END | |
| tell application "Finder" | |
| display dialog "Hello" | |
| end tell | |
| END |
| // This is a comparison between Haskell and Groovy based on some simple problems found in the following | |
| // Haskell Introduction: | |
| // http://learnyouahaskell.com/starting-out#ready-set-go | |
| // Ex 1. If we have two lists, [2,5,10] and [8,10,11] and we want to get the products of all the possible | |
| // combinations between numbers in those lists, here's what we'd do. | |
| /* HASKELL */ | |
| [ x*y | x <- [2,5,10], y <- [8,10,11]] |
| - (void)touchesEnded: (NSSet *)touches withEvent: (UIEvent *)event { | |
| for (UIView* view in self.view.subviews) { | |
| if ([view isKindOfClass:[UITextField class]]) | |
| [view resignFirstResponder]; | |
| } | |
| } |