Skip to content

Instantly share code, notes, and snippets.

Avatar

Sébastien Boulet gontard

View GitHub Profile
@gontard
gontard / CreateAccountRequest.proto
Last active Mar 19, 2021
Customize ScalaPB code generation using ScalaPB transformations on protoc-gen-validate rules
View CreateAccountRequest.proto
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 Mar 19, 2021
ScalaPB code generation of case class and validator
View CreateAccountRequest.proto
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 Aug 8, 2019 — forked from Bunk/uploadLocalFile.js
Nightwatch — Upload local files to remote selenium grid
View uploadLocalFile.js
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 Apr 2, 2016
private server on the raspberry
View raspian-install-commands.md

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 Feb 27, 2016
JFX 2 : morphing 2D Transition. The FXMorphing class is an application thats demonstrate how to use the Morphing2D Transition.
View FXMorphing.java
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;