mkdir -p src/hello
cat <<EOF > src/hello/HelloHttp.java
package hello;
import com.sun.net.httpserver.HttpServer;
import java.io.OutputStream;
import java.net.InetSocketAddress;
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
variable "subscription_id" {} | |
variable "tenant_id" {} | |
variable "client_id" {} | |
variable "client_secret" {} | |
variable "location" {} |
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 | |
cat <<EOF > /tmp/gcp-service-account.json | |
${SERVICE_ACCOUNT} | |
EOF | |
gcloud auth activate-service-account --key-file=/tmp/gcp-service-account.json | |
gcloud config set project ${PROJECT_ID} | |
gcloud config set compute/region ${REGION} | |
gcloud config set compute/zone ${ZONE} |
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
params: | |
tfstate: &tfstate | |
TF_VAR_region: ((aws_region)) | |
TF_VAR_access_key: ((aws_access_key_id)) | |
TF_VAR_secret_key: ((aws_secret_access_key)) | |
TF_VAR_availability_zones: ((availability_zones)) | |
TF_VAR_env_name: ((env_name)) | |
TF_VAR_dns_suffix: ((dns_suffix)) | |
TF_VAR_rds_instance_count: ((rds_instance_count)) | |
TF_VAR_rds_instance_class: ((rds_instance_class)) |
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 org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
import org.springframework.http.MediaType; | |
import org.springframework.messaging.rsocket.RSocketRequester; | |
import org.springframework.web.bind.annotation.GetMapping; | |
import org.springframework.web.bind.annotation.RestController; | |
import reactor.core.publisher.Flux; | |
import reactor.core.publisher.Mono; | |
import java.net.URI; |
This file has been truncated, but you can view the full file.
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 com.example; | |
import java.util.function.IntSupplier; | |
// https://openjdk.java.net/jeps/325 | |
public enum DayOfWeek { | |
MONDAY(6, () -> 0), // | |
TUESDAY(7, () -> 1), // | |
WEDNESDAY(9), // | |
THURSDAY(8), // |
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 com.example.demorsocketrpc; | |
@javax.annotation.Generated( | |
value = "by RSocket RPC proto compiler", | |
comments = "Source: simple.proto") | |
@io.rsocket.rpc.annotations.internal.Generated( | |
type = io.rsocket.rpc.annotations.internal.ResourceType.CLIENT, | |
idlClass = SimpleService.class) | |
public final class SimpleServiceClient implements SimpleService { | |
private final io.rsocket.RSocket rSocket; |
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 | |
set -e | |
cf login -a ${CF_API} -u ${CF_USERNAME} -p ${CF_PASSWORD} -o ${CF_ORGANIZATION} -s ${CF_SPACE} | |
set +e | |
cf rename ${APP_NAME} ${APP_NAME}-venerable | |
set -e | |
mv nexus/*.jar ${APP_NAME}.jar | |
cf push -p ${APP_NAME}.jar -f repo/manifest.yml | |
cat repo/manifest.yml | ruby -ryaml -e 'app = YAML.load(ARGF)["applications"][0]; app["network_policies"].each { |x| if x["source"] == nil then puts "cf add-network-policy " + app["name"] + " --destination-app " + x["destination"] + " --protocol " + x["protocol"] + " --port " + x["port"].to_s else puts "cf add-network-policy " + x["source"] + " --destination-app " + app["name"] + + " --protocol " + x["protocol"] + " --port " + x["port"].to_s end }' > add-network-policies.sh | |
bash add-network-policies.sh |