Skip to content

Instantly share code, notes, and snippets.

View nicmarti's full-sized avatar

Nicolas Martignole nicmarti

View GitHub Profile
### Keybase proof
I hereby claim:
* I am nicmarti on github.
* I am nicmarti (https://keybase.io/nicmarti) on keybase.
* I have a public key whose fingerprint is 6672 0E0F 9FCC C14F 6F16 CAC8 8EE8 CC06 831B 410B
To claim this, I am signing this object:
[info] [SUCCESSFUL ] org.scala-sbt#serialization_2.10;0.1.1!serialization_2.10.jar (1615ms)
2017-01-12T08:18:10.881+01:00[info] [SUCCESSFUL ] org.scala-lang.modules#scala-pickling_2.10;0.10.0!scala-pickling_2.10.jar (113ms)
2017-01-12T08:18:10.882+01:00[info] downloading https://repo1.maven.org/maven2/org/json4s/json4s-core_2.10/3.2.10/json4s-core_2.10-3.2.10.jar ...
2017-01-12T08:18:10.898+01:00[info] [SUCCESSFUL ] org.json4s#json4s-core_2.10;3.2.10!json4s-core_2.10.jar (81ms)
2017-01-12T08:18:10.899+01:00[info] downloading https://repo1.maven.org/maven2/org/spire-math/jawn-parser_2.10/0.6.0/jawn-parser_2.10-0.6.0.jar ...
2017-01-12T08:18:10.900+01:00[info] [SUCCESSFUL ] org.spire-math#jawn-parser_2.10;0.6.0!jawn-parser_2.10.jar (44ms)
2017-01-12T08:18:10.901+01:00[info] downloading https://repo1.maven.org/maven2/org/spire-math/json4s-support_2.10/0.6.0/json4s-support_2.10-0.6.0.jar ...
2017-01-12T08:18:11.358+01:00[info] downloading https://repo1.maven.org/maven2/org/scalamacros/quasiquotes_2.10/2.0.1/quasi
@nicmarti
nicmarti / java
Created July 21, 2017 15:27
Play 2.5 Java - Download a set of images, described in a JSON file with a list of URLs, using Akka stream.
package services;
import akka.actor.ActorSystem;
import akka.stream.ActorMaterializer;
import akka.stream.Materializer;
import akka.stream.javadsl.FileIO;
import com.fasterxml.jackson.databind.JsonNode;
import play.api.Play;
import play.libs.Json;
import play.libs.ws.StreamedResponse;
@nicmarti
nicmarti / AkkaServerSentClientApp.scala
Created August 1, 2017 21:43
Simple Akka HTTP Server-sent-event client
/*
* Copyright 2017 Lunatech
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@nicmarti
nicmarti / README.md
Last active March 5, 2024 20:54
Exercice Scala niveau débutant

Lunatech

Scala tutorial.

Audience : cet exercice s'adresse à des développeurs ayant quelques bases en Scala. Il permet de découvrir la mise en place progressive d'un ensemble de fonctions et de types, pour résoudre un problème simple.

L'objectif de cet exercice est de réaliser un générateur d'équipement pour le jeu Minecraft. Minecraft est un jeu d'exploration. L'aventurier doit trouver des ingrédients de base, puis les combiner afin de constuire

@nicmarti
nicmarti / KVotesReplay.kt
Created May 3, 2018 22:01
Devoxx CFP Web client to replay votes from a Gluon log file
import org.apache.http.client.ClientProtocolException
import org.apache.http.client.ResponseHandler
import org.apache.http.client.methods.HttpPost
import org.apache.http.entity.StringEntity
import org.apache.http.impl.client.HttpClients
import org.apache.http.util.EntityUtils
import java.io.File
/**
@nicmarti
nicmarti / ProjectService.java
Created May 9, 2020 17:15
Quarkus RESTEasy and update with Transaction
@ApplicationScoped
public class ProjectService {
@Inject
UserTransaction transaction;
private static Logger logger = LoggerFactory.getLogger(ProjectService.class);
@Inject