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 / helidon-cli-data.md
Last active June 6, 2020 01:31
Helidon CLI updates mechanism

Updates metadata

We need to handle updates for 3 different versions:

  • helidon
  • build-tools maven plugin
  • cli

metadata.properties:

helidon.version=2.0.0-RC2

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@romain-grecourt
romain-grecourt / HtmlEntityEncoder.java
Created April 15, 2020 03:53
reactive html encoder
/**
* Reactive HTML entities "encoder".
*/
class HtmlEntityEncoder extends BaseProcessor<DataChunk, DataChunk> {
private static final ByteBufferCache BBCACHE = new ByteBufferCache(
(int index) -> ByteBuffer.wrap(HtmlEscape.ENTITIES[index][1].getBytes()), HtmlEscape.ENTITIES.length);
protected final VirtualBuffer vbuf = new VirtualBuffer();
private boolean started;
@romain-grecourt
romain-grecourt / GIF-Screencast-OSX.md
Created March 31, 2020 00:17 — forked from dergachev/GIF-Screencast-OSX.md
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

Ingredients

  • 3 1/2 cups or more whole wheat flour
  • 6 tsp baking powder
  • 1 tsp salt
  • 1 1/2 cups milk
  • 8 tbs butter
  • 1 egg

Instructions

INGREDIENTS

  • 3/4 cup (180ml) warm water (105°F to 115°F, 40C to 45C)
  • 1 envelope active dry yeast
  • 2 cups (or more) all purpose flour
  • 1 teaspoon sugar
  • 3/4 teaspoon salt
  • 3 tablespoons olive oil

PREPARATION

@romain-grecourt
romain-grecourt / helidon-init.md
Last active March 5, 2020 19:25
Helidon init

Our requirements

  • Nice interactive user experience (terminal prompts)
  • Structured properties to support conditons (e.g. if ${jpa} then ask ${data-source})
  • Map files and templates to archetype properties
  • Standalone (no mvnw, no pom.xml, just java)
  • Support Maven Archetype ?

Maven Archetype issues

@romain-grecourt
romain-grecourt / helidon-archetype.xml
Last active March 3, 2020 21:38
Helidon Archtype
<archetype-descriptor name="test">
<properties>
<property id="gradle" description="Gradle based project" />
<property id="maven" description="Maven based project" />
<property id="groupId" description="Project groupId" />
<property id="artifactId" description="Project artifactId" />
<property id="version" description="Project version" />
<property id="name" description="Project name" />
<property id="package" description="Java package name" />
</properties>
@romain-grecourt
romain-grecourt / LifecycleParticipant.java
Created February 27, 2020 23:05
maven life-cycle execution listener
/*
* Copyright (c) 2020 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
@romain-grecourt
romain-grecourt / DevMojo.java
Created February 27, 2020 20:34
embedded maven from a plugin with no fork
package io.helidon.build.maven;
import java.io.PrintStream;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoFailureException;
import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.Parameter;