Skip to content

Instantly share code, notes, and snippets.

View gberche-orange's full-sized avatar

Guillaume Berche gberche-orange

  • orange
  • France
View GitHub Profile
@gberche-orange
gberche-orange / gist:0fd51fe126d41f8e2c20
Last active August 29, 2015 14:15
openhub repo creation brute force script
#!/bin/bash
#might need to add oauth to avoid running into github rate limiting quotas
curl https://api.github.com/orgs/cloudfoundry/repos?page=1 >> repos.yml
curl https://api.github.com/orgs/cloudfoundry/repos?page=2 >> repos.yml
curl https://api.github.com/orgs/cloudfoundry-incubator/repos?page=2 >> incubator_repos.yml
REPOS=$(cat repos* *incu* | grep git_url | cut -f 4 -d'"');
#manually test with a single repo instead
#REPOS=git://github.com/cloudfoundry-incubator/fezzik.git
@gberche-orange
gberche-orange / gist:91581c3c39fdd8bec9ac
Last active August 29, 2015 14:26
autosleep component diagram
@startuml
() ServiceBroker
() RouteService
component AutoScalerApp
AutoScalerApp -up- [ServiceBroker]
AutoScalerApp -up- [RouteService]
database "Redis" {
private static Throwable fetchLogsOrReturnError(DopplerClient dopplerClient, String applicationId, int retry) {
Throwable dopplerException = null;
Disposable subscribedLogs = null;
try {
final CountDownLatch latch = new CountDownLatch(1);
final AtomicLong count = new AtomicLong();
final AtomicReference<Throwable> errorReference = new AtomicReference<>();
final AtomicReference<Long> lastTimeStamp = new AtomicReference<>(0L);
final AtomicReference<Long> firstTimeStamp = new AtomicReference<>(-1L);
long beforeFetchingLogsTs = System.nanoTime();
/usr/lib/jvm/java-8-openjdk-amd64/bin/java -ea -Didea.launcher.port=7532 -Didea.launcher.bin.path=/opt/idea-IU-162.1628.40/bin -Didea.junit.sm_runner -Dfile.encoding=UTF-8 -classpath /opt/idea-IU-162.1628.40/lib/idea_rt.jar:/opt/idea-IU-162.1628.40/plugins/junit/lib/junit-rt.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/charsets.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext/cldrdata.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext/dnsns.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext/icedtea-sound.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext/jaccess.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext/java-atk-wrapper.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext/localedata.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext/nashorn.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext/sunec.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext/sunjce_provider.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext/sunpkcs11.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext/zipfs.jar:/usr/lib/jvm/java-8-openjdk-
2017-01-30 10:53:06,047 reactor-http-nio-1 reactor.ipc.netty.http.client.HttpClient [id: 0x9eb5885a, L:/10.0.2.15:46698 - R:api.nd-cfapi.itn.ftgroup/10.117.41.250:443] RECEIVED: 4096B
2017-01-30 10:53:06,049 reactor-http-nio-1 reactor.ipc.netty.http.client.HttpClient [id: 0x9eb5885a, L:/10.0.2.15:46698 - R:api.nd-cfapi.itn.ftgroup/10.117.41.250:443] RECEIVED: 16384B
2017-01-30 10:53:06,049 reactor-http-nio-1 reactor.ipc.netty.http.client.HttpClient [id: 0x9eb5885a, L:/10.0.2.15:46698 - R:api.nd-cfapi.itn.ftgroup/10.117.41.250:443] RECEIVED: 16384B
2017-01-30 10:53:06,054 reactor-http-nio-1 reactor.ipc.netty.http.client.HttpClient [id: 0x9eb5885a, L:/10.0.2.15:46698 - R:api.nd-cfapi.itn.ftgroup/10.117.41.250:443] RECEIVED: 12296B
2017-01-30 10:53:06,054 reactor-http-nio-1 reactor.ipc.netty.http.client.HttpClient [id: 0x9eb5885a, L:/10.0.2.15:46698 - R:api.nd-cfapi.itn.ftgroup/10.117.41.250:443] RECEIVED: 12296B
2017-01-30 10:53:06,060 reactor-http-nio-1 reactor.ipc.netty.http.client.HttpClient [id
2017-03-14 09:26:35,776 DEBUG cloudfoundry-client-nio-4 reactor.ipc.netty.http.client.HttpClient [id: 0x1e23d8a1, L:/10.0.2.15:60952 - R:doppler.run.pivotal.io/54.85.105.67:443] WRITE: 1405B
2017-03-14 09:26:35,776 DEBUG cloudfoundry-client-nio-4 reactor.ipc.netty.http.client.HttpClient [id: 0x1e23d8a1, L:/10.0.2.15:60952 - R:doppler.run.pivotal.io/54.85.105.67:443] FLUSH
2017-03-14 09:26:35,891 DEBUG cloudfoundry-client-nio-4 reactor.ipc.netty.http.client.HttpClient [id: 0x1e23d8a1, L:/10.0.2.15:60952 - R:doppler.run.pivotal.io/54.85.105.67:443] USER_EVENT: SslHandshakeCompletionEvent(SUCCESS)
2017-03-14 09:26:35,892 DEBUG cloudfoundry-client-nio-4 reactor.ipc.netty.channel.ChannelOperationsHandler [id: 0x1e23d8a1, L:/10.0.2.15:60952 - R:doppler.run.pivotal.io/54.85.105.67:443] Writing object EmptyLastHttpContent
2017-03-14 09:26:35,892 DEBUG cloudfoundry-client-nio-4 reactor.ipc.netty.http.client.HttpClient [id: 0x1e23d8a1, L:/10.0.2.15:60952 - R:doppler.run.pivotal.io/54.85.105.67:443] FLUSH
2017-03-14
2017-08-31T18:54:57.50+0200 [API/1] OUT Creating build for app with guid adb17bc2-2a06-45fa-b495-6e86c0b90445
2017-08-31T18:54:57.56+0200 [API/1] OUT Updated app with guid adb17bc2-2a06-45fa-b495-6e86c0b90445 ({"state"=>"STARTED"})
2017-08-31T18:54:57.58+0200 [STG/0] OUT Creating container
2017-08-31T18:54:57.89+0200 [STG/0] OUT Successfully created container
2017-08-31T18:54:57.89+0200 [STG/0] OUT Downloading app package...
2017-08-31T18:54:57.97+0200 [CELL/0] OUT Successfully destroyed container
2017-08-31T18:55:00.00+0200 [STG/0] OUT Downloaded app package (19.6M)
2017-08-31T18:55:00.00+0200 [STG/0] OUT Downloading build artifacts cache...
2017-08-31T18:55:10.08+0200 [STG/0] OUT Downloaded build artifacts cache (427.6K)
2017-08-31T18:55:10.08+0200 [STG/0] OUT Staging...
2017-08-31T18:46:18.52+0200 [API/1] OUT Updated app with guid adb17bc2-2a06-45fa-b495-6e86c0b90445 ({"name"=>"cf-etherpad"})
2017-08-31T18:49:33.91+0200 [API/1] OUT Creating build for app with guid adb17bc2-2a06-45fa-b495-6e86c0b90445
2017-08-31T18:49:33.98+0200 [API/1] OUT Updated app with guid adb17bc2-2a06-45fa-b495-6e86c0b90445 ({"state"=>"STARTED"})
2017-08-31T18:49:34.00+0200 [STG/0] OUT Creating container
2017-08-31T18:49:34.28+0200 [STG/0] OUT Successfully created container
2017-08-31T18:49:34.28+0200 [STG/0] OUT Downloading app package...
2017-08-31T18:49:36.56+0200 [STG/0] OUT Downloaded app package (19.6M)
2017-08-31T18:49:36.56+0200 [STG/0] OUT Downloading build artifacts cache...
2017-08-31T18:49:36.65+0200 [STG/0] OUT Downloaded build artifacts cache (429.5K)
2017-08-31T18:49:36.65+0200 [STG/0] OUT Staging...
2017-08-31T19:50:03.52+0200 [API/0] OUT Creating build for app with guid adb17bc2-2a06-45fa-b495-6e86c0b90445
2017-08-31T19:50:03.62+0200 [API/0] OUT Updated app with guid adb17bc2-2a06-45fa-b495-6e86c0b90445 ({"state"=>"STARTED"})
2017-08-31T19:50:03.63+0200 [STG/0] OUT Creating container
2017-08-31T19:50:03.98+0200 [STG/0] OUT Successfully created container
2017-08-31T19:50:03.98+0200 [STG/0] OUT Downloading app package...
2017-08-31T19:50:06.75+0200 [STG/0] OUT Downloaded app package (19.6M)
2017-08-31T19:50:06.75+0200 [STG/0] OUT Downloading build artifacts cache...
2017-08-31T19:50:06.84+0200 [STG/0] OUT Downloaded build artifacts cache (429.8K)
2017-08-31T19:50:06.84+0200 [STG/0] OUT Staging...
2017-08-31T19:50:10.79+0200 [STG/0] OUT -------> Buildpack version 1.5.27
2017-08-31T20:16:52.58+0200 [API/0] OUT Updated app with guid adb17bc2-2a06-45fa-b495-6e86c0b90445 ({"name"=>"cf-etherpad", "instances"=>1, "memory"=>2048, "disk_quota"=>1024, "stack_guid"=>"6c17de72-7a94-45cd-9919-2c9b263fa22a", "buildpack"=>"https://github.com/cloudfoundry/nodejs-buildpack.git#v1.5.27", "environment_json"=>"PRIVATE DATA HIDDEN", "health_check_timeout"=>180})
2017-08-31T20:17:12.46+0200 [API/1] OUT Updated app with guid adb17bc2-2a06-45fa-b495-6e86c0b90445 ({"state"=>"STOPPED"})
2017-08-31T20:17:12.77+0200 [API/0] OUT Creating build for app with guid adb17bc2-2a06-45fa-b495-6e86c0b90445
2017-08-31T20:17:12.87+0200 [API/0] OUT Updated app with guid adb17bc2-2a06-45fa-b495-6e86c0b90445 ({"state"=>"STARTED"})
2017-08-31T20:17:12.90+0200 [STG/0] OUT Creating container
2017-08-31T20:17:13.17+0200 [STG/0] OUT Successfully created container
2017-08-31T20:17:13.17+0200 [STG/0] OUT Downloading app package...
2017-08-31T20:17:14.44+0200 [STG/0] OUT Downloaded app package (16.5M)
2017-08-31T20:17:14.44