Skip to content

Instantly share code, notes, and snippets.

Michel Jung micheljung

Block or report user

Report or block micheljung

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@micheljung
micheljung / build-tinytex.sh
Last active Jul 23, 2019
Script to create a truly portable TinyTeX installation without accessing any URLs other than a CTAN repository. Useful to build TinyTeX in corporate environments with restricted internet access. Since I'm not good at Shell scripting, the error handling might not work as expected.
View build-tinytex.sh
#!/bin/bash
set -u
set -e
set -o pipefail
# Adapted from https://github.com/yihui/tinytex/blob/master/tools/install-base.sh
# Creates a truly portable TinyTeX without accessing any URLs other than the CTAN repository
# Make sure that /usr/lib64/microsoft-r/3.3/lib64/R/etc/Renviron contains http_proxy,
# https_proxy and ftp_proxy (or adjust the script accordingly)
View install-tinytex.sh
#!/bin/sh
# Adapted from https://raw.githubusercontent.com/yihui/tinytex/master/tools/install-unx.sh
packages_file=$1
fail() {
echo $1
exit 1;
}
@micheljung
micheljung / Test.java
Created Nov 9, 2018
Demonstrates slow scrolling of JavaFX WebView
View Test.java
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.layout.StackPane;
import javafx.scene.web.WebEngine;
import javafx.scene.web.WebView;
import javafx.stage.Stage;
public class Test extends Application {
@Override
public void start(Stage stage) {
@micheljung
micheljung / JDK8164446.java
Created Apr 16, 2018
Reproduces https://bugs.openjdk.java.net/browse/JDK-8164446 JavaFX's addListener() isn't thread safe.
View JDK8164446.java
import javafx.application.Application;
import javafx.beans.property.SimpleStringProperty;
import javafx.beans.property.StringProperty;
import javafx.stage.Stage;
public class JDK8164446 extends Application {
@Override
public void start(Stage primaryStage) {
StringProperty stringProperty = new SimpleStringProperty();
@micheljung
micheljung / JI9046113.java
Last active Dec 15, 2016
Code to reproduce JI-9046113
View JI9046113.java
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.web.WebEngine;
import javafx.scene.web.WebView;
import javafx.stage.Stage;
public class JI9046113 extends Application {
public static void main(String[] args) {
launch(args);
@micheljung
micheljung / WebViewBug.java
Last active Dec 14, 2016
Demonstration of a bug in the JavaFX WebView (tested with Java 8 u111).In order to see the bug, resize the window. Tested with jdk-9-ea+148_windows-x64_bin.exe as well. Use -Dprism.showdirty=true to see dirty regions.
View WebViewBug.java
import javafx.animation.KeyFrame;
import javafx.animation.Timeline;
import javafx.application.Application;
import javafx.concurrent.Worker.State;
import javafx.scene.Scene;
import javafx.scene.web.WebEngine;
import javafx.scene.web.WebView;
import javafx.stage.Stage;
import javafx.util.Duration;
import netscape.javascript.JSObject;
@micheljung
micheljung / AvoidComments.java
Created May 20, 2016
An example of how comments and JavaDocs can be avoided
View AvoidComments.java
public class AvoidComments {
/**
* Example of a superfluous comment.
*/
private void badComment() {
// Time in milliseconds before exploding
long time = 5000;
}
@micheljung
micheljung / JDK8144162.java
Created Dec 1, 2015
Reproduces JDK-8144162 Exception in thread "JavaFX Application Thread" java.lang.NullPointerException at com.sun.javafx.webkit.theme.ScrollBarThemeImpl.getThumb(ScrollBarThemeImpl.java:409)
View JDK8144162.java
package sample;
import javafx.application.Application;
import javafx.application.Platform;
import javafx.concurrent.Worker;
import javafx.scene.web.WebEngine;
import javafx.scene.web.WebView;
import javafx.stage.Stage;
public class JDK8144162 extends Application {
You can’t perform that action at this time.