Skip to content

Instantly share code, notes, and snippets.

View gontard's full-sized avatar

Sébastien Boulet gontard

View GitHub Profile
compileIncremental := compileIncremental.dependsOn(pullRemoteCache).value,
products := products.dependsOn(pullRemoteCache).value,
copyResources := copyResources.dependsOn(pullRemoteCache).value
import org.apache.ivy.core.cache.ArtifactOrigin
import sbt.*
import sbt.Keys.*
import sbt.Project.inConfig
import sbt.internal.RemoteCache.*
import sbt.internal.inc.{HashUtil, JarUtils}
import sbt.internal.librarymanagement.IvyActions.mapArtifacts
import sbt.nio.Keys.*
import sbt.plugins.SemanticdbPlugin
@gontard
gontard / CreateAccountRequest.proto
Last active March 19, 2021 14:13
Customize ScalaPB code generation using ScalaPB transformations on protoc-gen-validate rules
syntax = "proto2";
package teads.api;
import "validate/validate.proto";
message CreateAccountRequest {
required string first_name = 1 [(validate.rules).string.max_len = 255];
required string last_name = 2 [(validate.rules).string.max_len = 255];
required string email = 3 [(validate.rules).string.email = true];
@gontard
gontard / CreateAccountRequest.proto
Last active March 19, 2021 14:07
ScalaPB code generation of case class and validator
syntax = "proto2";
package teads.api;
import "validate/validate.proto";
message CreateAccountRequest {
required string first_name = 1 [(validate.rules).string.max_len = 255];
required string last_name = 2 [(validate.rules).string.max_len = 255];
required string email = 3 [(validate.rules).string.email = true];
@gontard
gontard / uploadLocalFile.js
Created August 8, 2019 14:37 — forked from Bunk/uploadLocalFile.js
Nightwatch — Upload local files to remote selenium grid
const path = require('path')
const util = require('util')
const events = require('events')
const archiver = require('archiver')
const handleResult = cb => result => {
if (result.status !== 0) throw new Error(result.value.message)
cb(result.value)
}
@gontard
gontard / raspian-install-commands.md
Last active April 2, 2016 13:01
private server on the raspberry

Download raspian (> 10min)

wget http://raspbian-france.fr/download/raspbian_latest.zip

Unzip the image

unzip raspbian_latest.zip

=> image is 2016-03-18-raspbian-jessie.img

@gontard
gontard / FXMorphing.java
Last active February 27, 2016 01:24
JFX 2 : morphing 2D Transition. The FXMorphing class is an application thats demonstrate how to use the Morphing2D Transition.
import javafx.animation.Interpolator;
import javafx.animation.Transition;
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.layout.BorderPane;
import javafx.scene.shape.Ellipse;
import javafx.scene.shape.Rectangle;
import javafx.scene.shape.Shape;
import javafx.stage.Stage;
import javafx.util.Duration;