Skip to content

Instantly share code, notes, and snippets.

View mathieuancelin's full-sized avatar

Mathieu ANCELIN mathieuancelin

View GitHub Profile
import akka.actor.ActorSystem
import akka.http.scaladsl.Http
import akka.http.scaladsl.model.headers._
import akka.http.scaladsl.model._
import akka.http.scaladsl.util.FastFuture
import akka.stream.ActorMaterializer
import akka.util.ByteString
import scala.concurrent._
import kaleidoscope._
#!/bin/bash
LOCATION=`pwd`
SESSION_NAME="otoroshi-dev"
tmux start-server;
cd $LOCATION
tmux new-session -d -s $SESSION_NAME
package com.example.demo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
# sozu proxy test config file
command_socket = "./command_folder/sock"
saved_state = "./state.json"
log_level = "error"
log_target = "stdout"
command_buffer_size = 16384
worker_count = 2
handle_process_affinity = false
max_connections = 500
import java.util.concurrent.atomic.AtomicInteger
import akka.NotUsed
import akka.actor.ActorSystem
import akka.stream.ActorMaterializer
import akka.stream.scaladsl.{BroadcastHub, Keep, RunnableGraph, Source}
import scala.concurrent.duration._
implicit val actorSystem = ActorSystem("Pouet")
import com.google.common.collect.Lists;
import java.util.List;
public class Cake {
public static class User {
public final String name;
public User(String name) {
this.name = name;

Keybase proof

I hereby claim:

  • I am mathieuancelin on github.
  • I am mathieuancelin (https://keybase.io/mathieuancelin) on keybase.
  • I have a public key whose fingerprint is 6977 7FD5 1E08 E910 00D2 C4BE 1CD7 101B DD55 463A

To claim this, I am signing this object:

object JsonTest extends App {
object Implicits {
implicit final class EnhancedJsObject(obj: JsObject) {
def +?[A](tuple: (String, Option[A]))(implicit writes: Writes[A]): JsObject = {
tuple match {
case (key, Some(value)) => obj ++ Json.obj(key -> writes.writes(value))
case (key, None) => obj
}
}
import com.typesafe.sbt.packager.Keys._
import sbt.Keys._
import sbt._
/**
* Should be located in in myApp/project/javascript.scala
*
* To use it from your `build.sbt` file,
* just add the JS build setting to the project
*
import A from './module';
import AA, { doSomething } from './module';
A.doSomething() === doSomething()
AA.doSomethingElse()
//////////////////////////////////
export default const publicApi = {
doSomething() {