Skip to content

Instantly share code, notes, and snippets.

View romain-grecourt's full-sized avatar
🤟
[^._.^]ノ彡

Romain Grecourt romain-grecourt

🤟
[^._.^]ノ彡
View GitHub Profile
@romain-grecourt
romain-grecourt / Main.java
Last active September 15, 2018 04:43
helidon jsonb support
private static Routing createRouting() {
return Routing.builder()
.register(JsonbSupport.builder()
.type(Dog.class)
.config(new JsonbConfig()
.withNullValues(true))
.build())
.post("/test", Main::test)
.build();
}
@romain-grecourt
romain-grecourt / ee4j-optional-pipelines.md
Last active November 29, 2018 02:41
ee4j-optional-pipelines.md

EE4J Optional Pipelines

We do want 2 kind of CI pipelines:

  • Gate keeper that runs for everything, protected branches, feature branches and pull requests
  • Optional pipeline run on a "on demand" basis, controlled by committers and based on the changesets content

For GlassFish, the gate keeper pipeline shall run as fast as possible with the best coverage possible. Test suites are split in small chunks and executed concurrently, this allows to run many test suites and keep the end-to-end pipeline time acceptable.

Theoretically we could run every single test suite for every changeset ; however there is an implicit limitation of compute resources where the build could slow down the end-to-end time. Test suites may also not be 100% stable, causing sporadic failures that require a manual retry of some sort.

@romain-grecourt
romain-grecourt / protobuf.md
Last active December 21, 2018 22:30
Helidon Protobuf Support

Helidon Protobuf Support Proposal

Add support for protobuf entities in the Helidon WebServer.

I.e Provide a way to send and receive protobuf messages.

Examples

Enable Protobuf Support

@romain-grecourt
romain-grecourt / wercker-trigger.sh
Created May 22, 2019 22:04
Wercker trigger script
#!/bin/bash -e
trap 'echo "ERROR: Error occurred at ${BASH_SOURCE}:${LINENO} command: ${BASH_COMMAND}"' ERR
set -eo pipefail
usage(){
echo ""
echo "Usage: `basename ${0}` [OPTIONS] --owner=OWNER --app-name=APP_NAME --branch=BRANCH --pipeline=PIPELINE..."
echo ""
echo "Trigger wercker job(s)."
@romain-grecourt
romain-grecourt / Employee.java
Created May 29, 2019 00:45
JSONB pojo with immutable fields
package org.example;
import java.util.UUID;
import javax.json.bind.annotation.JsonbCreator;
import javax.json.bind.annotation.JsonbProperty;
public final class Employee {
private final String id;
private final String firstName;
/*
* Copyright (c) 2017, 2019 Oracle and/or its affiliates. All rights reserved.
*
* 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

Gougères bourguignonnes

Preparation and bake time: 1hour 20minutes

Ingredients

For 6 people:

  • 25cl of water
  • 80 gr of butter
@romain-grecourt
romain-grecourt / copyright-update.sh
Last active July 16, 2023 08:40
Update copyright year.