Skip to content

Instantly share code, notes, and snippets.

Jean-Christophe Sirot jcsirot

Block or report user

Report or block jcsirot

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Test.java
import java.util.function.*;
public class Test {
private final String s;
public Test(String s) {
this.s = s;
}
public Consumer<String> c = (x) -> System.out.println(x + "/" + this.s);
View Test.java
import java.util.function.*;
public class Test {
private final String s;
public Test(String s) {
this.s = s;
}
public Consumer<String> c = (x) -> System.out.println(x + "/" + s);
@jcsirot
jcsirot / script.groovy
Created Aug 23, 2015
Continuous delivery with Jenkins Workflow and Docker
View script.groovy
node {
env.JAVA_HOME="${tool 'JDK8'}"
stage 'Build'
git url: 'https://github.com/jcsirot/atmosphere-calculator.git'
def mvnHome = tool "maven-3.2.2"
sh "${mvnHome}/bin/mvn clean package"
step([$class: 'JUnitResultArchiver', testResults: '**/target/surefire-reports/TEST-*.xml'])
stage 'Build Docker image'
View CommandSerializer.java
package com.chelonix.codestory.elevator.serializer;
import java.io.IOException;
import com.chelonix.codestory.elevator.domain.Command;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;
View Rental.java
package com.chelonix.codestory.jajascript;
import java.util.List;
/**
* ...
*
* @author sirot
*/
public interface Rental
@jcsirot
jcsirot / Evaluator.java
Created Feb 19, 2013
Calculatrice (Code Story 2013)
View Evaluator.java
package com.chelonix.codestory.evaluator;
import java.io.IOException;
import java.math.BigDecimal;
import java.util.Iterator;
import java.util.Stack;
/**
*
* @author sirot
@jcsirot
jcsirot / Coin.java
Last active Dec 11, 2015
Implementation de Scalaskel
View Coin.java
public enum Coin
{
FOO(1),
BAR(7),
QIX(11),
BAZ(21);
private final int value;
Coin(int value)
@jcsirot
jcsirot / MockSMTPRule.java
Created Aug 3, 2012
SMTP server mock as a JUnit TestRule
View MockSMTPRule.java
package com.chelonix.selenium;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import com.dumbster.smtp.SimpleSmtpServer;
import com.dumbster.smtp.SmtpMessage;
import com.google.common.collect.Lists;
import org.junit.rules.ExternalResource;
@jcsirot
jcsirot / MavenPropertiesInjectorBuildWrapper.java
Created Mar 7, 2012
Jenkins injector for maven project version
View MavenPropertiesInjectorBuildWrapper.java
package jenkinsci.plugins.mavenpropsinject;
import hudson.Extension;
import hudson.Launcher;
import hudson.maven.AbstractMavenProject;
import hudson.maven.MavenModule;
import hudson.maven.MavenModuleSet;
import hudson.model.AbstractBuild;
import hudson.model.AbstractProject;
import hudson.model.BuildListener;
@jcsirot
jcsirot / jira.groovy
Created May 12, 2011
JIRA with Groovy
View jira.groovy
import groovy.net.xmlrpc.XMLRPCServerProxy as Proxy
class JiraProxy extends Proxy {
protected final token
JiraProxy(url, login, password) {
super(url)
this.token = super.invokeMethod("jira1.login", [login, password])
}
You can’t perform that action at this time.