Skip to content

Instantly share code, notes, and snippets.

View mheath's full-sized avatar

Mike Heath mheath

  • VMware
  • Salt Lake City, Utah
  • 03:32 (UTC -06:00)
  • X @mheath
View GitHub Profile
package io.pivotal.mheath;
import org.cloudfoundry.client.spring.SpringCloudFoundryClient;
import org.cloudfoundry.operations.CloudFoundryOperations;
import org.cloudfoundry.operations.CloudFoundryOperationsBuilder;
import reactor.rx.Stream;
/**
*
*/
@mheath
mheath / gist:fa2a650b41adcc28a004
Created April 22, 2015 22:10
Gorouter BOSH Job resource pool config
resource_pools:
- name: default
cloud_properties:
cpu: 2
disk: 8192
ram: 1024
@mheath
mheath / gist:6d186b854fbf580c228b
Created April 22, 2015 22:07
Gorouter config
---
status:
port: 8080
user: router_user
pass: "password"
nats:
@mheath
mheath / DeadlockTest.java
Created February 20, 2015 19:54
Deadlock publishing event while creating listener bean.
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.context.ApplicationEvent;
import org.springframework.context.ApplicationEventPublisher;
import org.springframework.context.ApplicationListener;
import org.springframework.context.annotation.Bean;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.Future;
@mheath
mheath / gist:6418208
Created September 2, 2013 23:35
CF NATS Example
Nats nats = new NatsConnector().addHost("nats://localhost").connect();
CfNats cfNats = new DefaultCfNats(nats);
cfNats.subscribe(ComponentDiscover.class, new PublicationHandler<ComponentDiscover, ComponentAnnounce>() {
@Override
public void onMessage(Publication<ComponentDiscover, ComponentAnnounce> publication) {
publication.reply(new ComponentAnnounce(...));
}
});