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
| // Create an array of Blackmagic Hyperdeck IP addresses to check | |
| var hyperdecks = ["192.168.0.100", "192.168.0.101", "192.168.0.102"]; | |
| function sendCommand(hyperdeck, command) { | |
| console.log("Hyperdeck " + hyperdeck + ": sending command " + command); | |
| var request = new XMLHttpRequest(); | |
| request.open("GET", "http://" + hyperdeck + "/" + command, false); | |
| request.send(); | |
| var response = request.responseXML; |
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
| #!/bin/bash | |
| function cfenv() { | |
| function curenv() { | |
| if [ "$1" = "" ]; then | |
| CURENV="default" | |
| else | |
| CURENV="$(echo "$1" | cut -d '-' -f 2)" | |
| fi | |
| } |
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
| @Configuration | |
| @EnableConfigurationProperties | |
| public class CloudFoundryConfiguration { | |
| @Bean | |
| @ConfigurationProperties(prefix = "cloudfoundry.client") | |
| public ResourceOwnerPasswordResourceDetails cloudFoundryCredentials() { | |
| return new ResourceOwnerPasswordResourceDetails(); | |
| } | |
| @Bean |
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 groovy | |
| @Grapes([ | |
| @Grab('com.fasterxml.jackson.core:jackson-databind:2.8.3'), | |
| @Grab('com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.8.3') | |
| ]) | |
| import com.fasterxml.jackson.databind.ObjectMapper | |
| import com.fasterxml.jackson.dataformat.yaml.YAMLFactory | |
| import com.fasterxml.jackson.dataformat.yaml.YAMLGenerator | |
| import com.fasterxml.jackson.dataformat.yaml.YAMLGenerator.Feature |
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 GreetingController { | |
| @Autowired | |
| private GreetingService service; | |
| @RequestMapping("/") | |
| public @ResponseBody String greet() { | |
| return service.getHelloMessage() + | |
| "<br/>" + | |
| service.getWelcomeMessage(); |
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 CustomXmlContextLoader extends GenericXmlContextLoader { | |
| @Override | |
| protected void customizeContext(GenericApplicationContext context) { | |
| ClassPathXmlApplicationContext propertySourceContext = | |
| new ClassPathXmlApplicationContext("classpath:/spring/property-source-context.xml"); | |
| PropertySource propertySource = propertySourceContext.getBean(RedisPropertySource.class); | |
| context.getEnvironment().getPropertySources().addFirst(propertySource); | |
| } |
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
| @ValidatorComponent | |
| public class PersonValidator implements Validator { | |
| /** | |
| * This Validator validates just Person instances | |
| */ | |
| public boolean supports(Class clazz) { | |
| return Person.class.equals(clazz); | |
| } | |
| public void validate(Object obj, Errors e) { |