Skip to content

Instantly share code, notes, and snippets.

Avatar

Matthieu Brouillard McFoggy

View GitHub Profile
@McFoggy
McFoggy / README.md
Created Feb 2, 2021
Launch maven with JFR
View README.md

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 Apr 25, 2019
Regedit file to add right click 'open CMD here' on folders
View open-cdm-here.reg
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 Apr 25, 2019
Automatically set CMD window title
View set-title.bat
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%
View jgitver-gravizo-sample.md

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 Sep 19, 2018
java switcher for windows CMD
View jv.bat
@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 ========================================================
View jgitver-maven-plugin-homepage.svg
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 Apr 13, 2016
jdk bug-webview-colgroup
View SimpleBrowser.java
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 Apr 11, 2016
JavaFX WebView JVM crash
View hs_err_pid5732.log
#
# 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]
#
@McFoggy
McFoggy / docker-machine-setup
Last active Mar 18, 2016
my docker-machine configuration with windows mounted disk
View docker-machine-setup
Pre-requisite:
- git installed https://git-scm.com/download/win
- docker-machine installed
me@computer $ docker-machine rm default
me@computer $ docker-machine create -d virtualbox --virtualbox-memory="1024" --virtualbox-cpu-count="1" --virtualbox-disk-size="20480" --virtualbox-host-dns-resolver=true default
me@computer $ docker-machine stop default
View docker-gitbucket-Dockerfile
FROM java:8
MAINTAINER Matthieu Brouillard matthieu@brouillard.fr
LABEL version=3.8
ENV GITBUCKET_HOME=/var/gitbucket
ENV GITBUCKET_APP=/opt/gitbucket/webapp
RUN mkdir -p $GITBUCKET_APP
RUN mkdir -p $GITBUCKET_HOME/plugins