Skip to content

Instantly share code, notes, and snippets.

Avatar

Joshua Chaitin-Pollak jbcpollak

View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am jbcpollak on github.
  • I am c11k (https://keybase.io/c11k) on keybase.
  • I have a public key ASDmtwOFCwtCfoRUdcn930atyNiC4CWMqDUyh2E7yTnWTAo

To claim this, I am signing this object:

@jbcpollak
jbcpollak / App.java
Last active Jan 13, 2016
Spring-Boot VFS for Stripes
View App.java
@Configuration
@Import({ApplicationConfiguration.class})
@SpringBootApplication
public class App extends SpringBootServletInitializer {
static {
VFS.addImplClass(SpringBootVfs.class);
}
@Override
View trace.log
VERSION:
6.10.0-b78bf10
REQUEST: [2015-02-19T12:01:01-05:00]
GET /v2/spaces/22d24a91-2171-41a0-8caa-4da27ed50536/apps?q=name%3Amy-app&inline-relations-depth=1 HTTP/1.1
Host: api.run.pivotal.io
Accept: application/json
Authorization: [PRIVATE DATA HIDDEN]
View push.log
Using manifest file /Users/me/src/my/app/manifest.yml Updating app my-app in org AssuredLabor / space staging as me@mycompany.com... OK Uploading my-app... Uploading app files from: /Users/me/src/my/app Uploading 15.4M, 5781 files 11.2M uploaded... Done uploading OK Stopping app my-app in org AssuredLabor / space staging as me@mycompany.com... OK Starting app my-app in org AssuredLabor / space staging as me@mycompany.com... -----> Downloaded app package (6.7M) Cloning into '/tmp/buildpacks/php-buildpack'... 2015-02-18 19:37:26,805 [INFO] cloudfoundry - CloudFoundry Initialized. 2015-02-18 19:37:26,805 [DEBUG] cloudfoundry - CloudFoundry Context Setup [{'LANG': <build_pack_utils.utils.FormattedDictWrapper object at 0x17625d0>, 'MEMORY_LIMIT': <build_pack_utils.utils.FormattedDictWrapper object at 0x1762790>, 'TMPDIR': '/tmp', 'VCAP_SERVICES': {}, 'VCAP_APPLICATION': {u'name': u'my-app', u'limits': {u'mem': 256, u'fds': 16384, u'disk': 1024}, u'space_id': u'22d24a91-2171-4
View push2.log
This file has been truncated, but you can view the full file.
View push.log
Using manifest file /Users/me/src/my/app/manifest.yml Updating app my-app in org MyCompany / space staging as me@mycompany.com... OK Uploading my-app... Uploading app files from: /Users/me/src/my/app Uploading 30.7M, 11564 files 15.3M uploaded... 22.6M uploaded... Done uploading OK Stopping app my-app in org MyCompany / space staging as me@mycompany.com... OK Starting app my-app in org MyCompany / space staging as me@mycompany.com... -----> Downloaded app package (14M) Cloning into '/tmp/buildpacks/php-buildpack'... 2015-02-17 20:41:46,993 [INFO] cloudfoundry - CloudFoundry Initialized. 2015-02-17 20:41:46,993 [DEBUG] cloudfoundry - CloudFoundry Context Setup [{'LANG': 'en_US.UTF-8', 'MEMORY_LIMIT': '256m', 'TMPDIR': '/tmp', 'VCAP_SERVICES': {}, 'VCAP_APPLICATION': {u'name': u'my-app', u'limits': {u'mem': 256, u'fds': 16384, u'disk': 1024}, u'space_id': u'22d24a91-2171-41a0-8caa-4da27ed50536', u'application_uris': [u'my-app.cfapps.io'], u'version': u'cb12947a-9fb7-4647-b
@jbcpollak
jbcpollak / CDataXmlOutputFactoryImpl.java
Created Jan 8, 2014
An XmlFactory and XmlOutputWriter used to force all fields to be wrapped with CDATA.
View CDataXmlOutputFactoryImpl.java
package xml;
import java.io.OutputStream;
import java.io.Writer;
import javax.xml.stream.*;
import javax.xml.transform.Result;
import com.fasterxml.aalto.stax.OutputFactoryImpl;
@jbcpollak
jbcpollak / FutureFactoryConfiguration.java
Created Nov 13, 2013
Future Factory Spring Configuration
View FutureFactoryConfiguration.java
@Configuration
public class FutureFactoryConfiguration {
ActorSystem system = ActorSystem.create();
@Resource(name="geocodingService")
private GeocodingService geocodingService;
@Bean(name="executionContext")
public ExecutionContext getExecutionContext() {
View GeocodingFutureFactoryTest.java
public class AddressGeocodingFutureFactoryTest extends FutureFactoryTestBase {
@Test
public void testFuture() throws Exception {
GeocodingService geocodingService = mock(GeocodingService.class);
GeocodingFutureFactory gff = new GeocodingFutureFactory();
gff.setExecutionContext(ec);
View FutureFactoryTestBase.java
public class FutureFactoryTestBase {
protected ExecutionContext ec;
@Before
public void setup() {
Config config = ConfigFactory.load();
ActorSystem system = ActorSystem.create("test", config);
ec = system.dispatchers().lookup("akka.test.calling-thread-dispatcher");