Skip to content

Instantly share code, notes, and snippets.

View McFoggy's full-sized avatar

Matthieu Brouillard McFoggy

View GitHub Profile
@McFoggy
McFoggy / HttpInvocation.java
Created October 5, 2022 16:53 — forked from petrbouda/HttpInvocation.java
Retry Mechanism for JDK HTTP Client
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.IOException;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.net.http.HttpResponse.BodyHandler;
import java.time.Duration;
import java.util.concurrent.CompletableFuture;
@McFoggy
McFoggy / version-up.sh
Created May 4, 2022 14:58 — forked from OleksandrKucherenko/version-up.sh
Calculate Next Suitable Version Tag for Your Git based project
#!/usr/bin/env bash
## Copyright (C) 2017, Oleksandr Kucherenko
## Last revisit: 2017-09-29
## Bug fixes: 2021-06-09, @slmingol changes applied
# For help:
# ./versionip.sh --help
# For developer / references:
# https://ryanstutorials.net/bash-scripting-tutorial/bash-functions.php
@McFoggy
McFoggy / README.md
Created February 2, 2021 15:01
Launch maven with JFR

Launch maven with JFR activated

SET "MAVEN_OPTS=-Ddistinct.local.repository=true -Xmx3G -Xms256m -Djava.awt.headless=true -XX:+UnlockCommercialFeatures -XX:+FlightRecorder -XX:StartFlightRecording=duration=60s,delay=0s,settings=profile,filename=/tmp/recording.jfr"
mvn verify
@McFoggy
McFoggy / open-cdm-here.reg
Created April 25, 2019 05:35
Regedit file to add right click 'open CMD here' on folders
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Folder\shell\Open CMD here]
[HKEY_CLASSES_ROOT\Folder\shell\Open CMD here\command]
@="cmd.exe /k \"D:\\dev\\tools\\scripts\\bat\\cmdrc.cmd %L\""
@McFoggy
McFoggy / set-title.bat
Created April 25, 2019 05:32
Automatically set CMD window title
REM set window title based on open directory
SET WINDOW_TITLE=%~n1%
REM if current directory has a '.title' file, use it instead
IF EXIST %CD%/.title SET /P WINDOW_TITLE=<%CD%/.title
#REM finally set the window title
TITLE %WINDOW_TITLE%

Alt text

Some text custom_mark10 digraph G { size ="4,4"; main [shape=circle]; A -> B; B -> C; C [label="1.0.0"];
@McFoggy
McFoggy / jv.bat
Created September 19, 2018 07:12
java switcher for windows CMD
@ECHO OFF
REM ========================================================
REM
REM This file is a helper to switch to different JDKs
REM It creates a directory symbolic link to %BASE_JDK_HOME%\current
REM the directory '%BASE_JDK_HOME%\current' should be part of your path
REM
REM ========================================================
@McFoggy
McFoggy / jgitver-maven-plugin-homepage.svg
Created August 5, 2016 09:22
jgitver-maven-plugin-images
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@McFoggy
McFoggy / SimpleBrowser.java
Created April 13, 2016 15:11
jdk bug-webview-colgroup
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.web.WebView;
import javafx.stage.Stage;
public class SimpleBrowser extends Application {
@Override
public void start(Stage stage) {
WebView wv = new WebView();
wv.getEngine().load("http://localhost:8080/app.html");
@McFoggy
McFoggy / hs_err_pid5732.log
Created April 11, 2016 19:01
JavaFX WebView JVM crash
#
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x5fe2c175, pid=5732, tid=0x00001ffc
#
# JRE version: Java(TM) SE Runtime Environment (8.0_102-b01) (build 1.8.0_102-ea-b01)
# Java VM: Java HotSpot(TM) Client VM (25.102-b01 mixed mode windows-x86 )
# Problematic frame:
# C [jfxwebkit.dll+0x8ec175]
#