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
| #!/usr/bin/env bash | |
| # | |
| # Simple script that downloads the specified version from proto-resources repo. | |
| # | |
| # Usage: | |
| # | |
| # ./sync-proto-resources.sh [version] [destination] | |
| # - version (default latest): the version which you want to download. | |
| # - destination (default PWD/proto): the destination directory where to put the downloaded files. | |
| # |
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
| { | |
| "Version": "2012-10-17", | |
| "Statement": [ | |
| { | |
| "Effect": "Allow", | |
| "Resource": [ | |
| "*" | |
| ], | |
| "Action": [ | |
| "lambda:InvokeFunction" |
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
| package br.com.caelum.vraptor.controller; | |
| import java.util.List; | |
| import javax.inject.Inject; | |
| import br.com.caelum.vraptor.Consumes; | |
| import br.com.caelum.vraptor.Controller; | |
| import br.com.caelum.vraptor.Delete; | |
| import br.com.caelum.vraptor.Get; |
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
| @Controller | |
| public class CORSController { | |
| @Inject private Result result; | |
| @Inject private Router router; | |
| @Options("/*") | |
| public void options(@Observes VRaptorRequestStarted requestInfo) { | |
| Set<HttpMethod> allowed = router.allowedMethodsFor(requestInfo.getRequest().getRequestedUri()); | |
| String allowMethods = allowed.toString().replaceAll("\\[|\\]", ""); |
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 Farm { | |
| private Long id; | |
| private String name; | |
| private Polygon perimeter; | |
| public Farm() { | |
| } | |
| public Long getId() { |