Skip to content

Instantly share code, notes, and snippets.

View ncapponi's full-sized avatar

Capponi nicolas ncapponi

View GitHub Profile
@ncapponi
ncapponi / SuperCsvBenchmark
Created October 7, 2015 16:09
Benchmark of super-csv with JMH
package org.sample;
import java.io.FileWriter;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.Setup;
@ncapponi
ncapponi / gist:3879131
Created October 12, 2012 13:12
Coding dojo cara : SRP
package cara;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectOutputStream;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
package code.puzzles;
public class WebServiceClient {
private final Webservice webservice = new Webservice();
public <T> T getResource(RequestKey<T> key) throws WebserviceException {
T resource = null;
try {
resource = webservice.get(key);
} catch (RuntimeException e) {
<plugin>
<groupId>org.jruby.plugins</groupId>
<artifactId>jruby-rake-plugin</artifactId>
<version>1.2.0</version>
<executions>
<!-- gem installation done in multiples steps because it does not work with more than 1 gem and giving a version at the same time -->
<execution>
<id>install-gems step 1</id>
<phase>process-resources</phase>
<goals>