This file contains 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
# Deploy RabbitMQ | |
ltc create rabbit rabbitmq:3-management -r -p 5672,15672 -M 5672 -m 512 | |
# Deploy Spring Cloud Config Server | |
ltc create config-server mstine/config-server --memory-mb=512 -e SPRING_CLOUD_CONFIG_SERVER_GIT_URI=https://github.com/pieterhumphrey/config-repo -p 8888 | |
# Deploy Netflix OSS Eureka via Spring Cloud Netflix | |
ltc create eureka mstine/eureka --memory-mb=512 -p 8761 | |
# Deploy Config Server Client Demo App |
This file contains 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
@HystrixCommand(fallbackMethod = "fallbackFortune", commandProperties = { | |
@HystrixProperty(name = "circuitBreaker.errorThresholdPercentage", value = "20") | |
}) | |
public Fortune randomFortune() { | |
return restTemplate.getForObject("http://fortunes/random", Fortune.class); | |
} |
This file contains 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
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDUcedI6ZmwPIOcH9qfRxrKOy+OqHXxREanrMaT19ta3cdCNr+QVaq8eeENtQdNzUW1TpNeru6/JUdoNffNr2udX9S7GiFGzDq43ChA3u2b2Gh4aOs89G6ZL+3DTYQurEfAbtsFvMSwR0ooca494tYXu29lie39OBaw3isjc25wIEqKpmQtvUoKB7XgEP9sbOO4srGppVGWgKZRnEiCfvxPi7l2Ol7Je9grxLv8W6yyPZq9cWiVFMf7B6XyldPrPLbvu4DfKCXVRgMYQKt8GinKCyaU+hq/aVbUoOkupaM79Rv9+VqkuP7qraBHxZMRqYLUuDctC4hg/VgMk34DTbIv mstine@mstine-mbp.local |
This file contains 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 main | |
import ( | |
"fmt" | |
"private/point/point" | |
) | |
func main() { | |
//tag::NewPoint[] |
This file contains 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 main | |
import ( | |
"bufio" | |
"errors" | |
"fmt" | |
"net/http" | |
"os" | |
"strconv" | |
"strings" |
This file contains 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
--- | |
name: test | |
director_uuid: 46beb722-f241-4419-a0b5-dcba70805116 | |
releases: | |
- name: lite | |
version: 151.9-dev | |
networks: | |
- name: default |
This file contains 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 | |
@PropertySource("classpath:application.properties") | |
public class AppConfig { | |
@Autowired | |
private Environment env; | |
@Bean | |
public DriverManagerDataSource dataSource() { | |
final DriverManagerDataSource driverManagerDataSource = |
This file contains 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
task uberJar(type: Jar) { | |
baseName = "foo-cacheserver-uberjar" | |
from { | |
sourceSets.main.output.classesDir | |
sourceSets.main.output.resourcesDir | |
configurations.compileNoGemFire.collect { it.isDirectory() ? it : zipTree(it) } | |
} | |
} |
This file contains 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 org.codehaus.jackson.map.ObjectMapper; | |
import java.util.Map; | |
import java.net.URL; | |
import java.io.*; | |
public class Lucky13 { | |
public int pay(int bet) throws Exception { | |
return new ObjectMapper().readValue(new BufferedReader(new InputStreamReader(new URL("http://roulette.engineyard.com/") | |
.openStream())).readLine(), Map.class).get("winning_number").equals("13") ? 35 * bet : 0; | |
} |
This file contains 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
<script language="JavaScript"> | |
document.write("<SCR" + "IPT SRC='" + ez_codePath + "ezloader.js'><\/SCR" + "IPT>"); | |
</script> |