Skip to content

Instantly share code, notes, and snippets.

@freemanjp
freemanjp / cla.md
Last active April 9, 2017 06:36
GantSign CLA

Contributor License Agreement

The following terms are used throughout this agreement:

  • You - the person or legal entity including its affiliates asked to accept this agreement. An affiliate is any entity that controls or is controlled by the legal entity, or is under common control with it.
  • Project - is an umbrella term that refers to any and all GantSign Ltd. open source projects.
  • Contribution - any type of work that is submitted to a Project, including any modifications or additions to existing work.
  • Submitted - conveyed to a Project via a pull request, commit, issue, or any form of electronic, written, or verbal communication with GantSign Ltd., contributors or maintainers.

1. Grant of Copyright License.

@freemanjp
freemanjp / Javac.java
Last active April 29, 2019 07:47
native-image support for javac
import com.sun.tools.javac.Main;
import java.nio.file.Files;
import java.nio.file.Paths;
public class Javac {
public static void main(String[] args) throws Exception {
String jdkHome = System.getenv("GRAAL_HOME");
if (jdkHome == null || jdkHome.trim().isEmpty()) {
System.err.println("Error: Environment variable GRAAL_HOME missing");
@freemanjp
freemanjp / build-javac-native.sh
Last active April 29, 2019 07:29
script to build native javac
javac -classpath "$JAVA_HOME/lib/tools.jar" Javac.java
native-image \
--no-fallback \
-H:IncludeResourceBundles=com.sun.tools.javac.resources.compiler,com.sun.tools.javac.resources.javac \
-H:Name=javac-native \
-classpath ".:$JAVA_HOME/lib/tools.jar" \
Javac
@freemanjp
freemanjp / settings.xml
Created April 27, 2019 13:05
Maven settings for native javac
<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
https://maven.apache.org/xsd/settings-1.0.0.xsd">
<profiles>
<profile>
<id>javac-native</id>
<activation>
<activeByDefault>true</activeByDefault>
@freemanjp
freemanjp / maven_opts.csv
Created April 27, 2019 16:43
Tuned MAVEN_OPTS
JVM MAVEN_OPTS
8u212 -Xshare:on -XX:TieredStopAtLevel=1 -XX:+UseParallelGC -Xverify:none
8u212_openj9 -Xquickstart -Xshareclasses:name=mvn -DargLine=-Xquickstart -Xverify:none
8u202_graalvm-ce -Xshare:off -Dgraal.CompilerConfiguration=economy
11.0.3 -Xshare:on -XX:TieredStopAtLevel=1 -XX:+UseParallelGC -Xverify:none
11.0.3_openj9 -Xquickstart -Xshareclasses:name=mvn -DargLine=-Xquickstart -Xverify:none
@freemanjp
freemanjp / Delete gh-pages branch locally
Created August 4, 2022 10:03
Delete gh-pages branch locally
# Delete origin/gh-pages branch
git branch -Dr origin/gh-pages
# Prevent it being fetched again (requires git >= 2.29)
git config --add remote.origin.fetch '^refs/heads/gh-pages'