Skip to content

Instantly share code, notes, and snippets.

View HanSolo's full-sized avatar

Gerrit Grunwald HanSolo

View GitHub Profile
@HanSolo
HanSolo / foojay.cla
Last active February 12, 2021 16:50
Foojay Contributor Agreement
This Foojay Contributor Agreement (“FCA” or “Agreement”) applies to any contribution that you submit to fcasubmissions@foojay.io or other submission method that references this Agreement. This Agreement sets out the intellectual property rights you grant to us in the contributed materials. The term “us” shall mean Azul Systems, Inc., a Delaware Corporation. The term “you” shall mean the person or entity identified below or in this form. Read this agreement carefully before executing. These terms and conditions constitute a binding legal agreement.
The term 'contribution' or ‘contributed materials’ means any source code, object code, patch, tool, sample, graphic, specification, manual, documentation, or any other material posted or submitted by you.
With respect to any worldwide copyrights, or copyright applications and registrations in your contribution:
• you hereby assign to us joint ownership, and to the extent that such assignment is or becomes invalid, ineffective or unen
@HanSolo
HanSolo / Detector.java
Last active August 30, 2023 23:42
Detector: A plain Java class that offers some utility methods to detect dark theme on MacOS and Windows
import javafx.scene.paint.Color;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.StringWriter;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
@HanSolo
HanSolo / Main.java
Created February 14, 2020 14:36
GalaxyFX (Template for a simple JavaFX application with a Canvas node)
import javafx.application.Application;
import javafx.scene.canvas.Canvas;
import javafx.scene.canvas.GraphicsContext;
import javafx.scene.paint.Color;
import javafx.stage.Stage;
import javafx.scene.layout.StackPane;
import javafx.scene.Scene;
/**
@HanSolo
HanSolo / keybase.md
Last active October 14, 2019 12:05
keybase.md

Keybase proof

I hereby claim:

  • I am HanSolo on github.
  • I am hansolo_ (https://keybase.io/hansolo_) on keybase.
  • I have a public key whose fingerprint is 6AF6 FF23 1BC3 07D9 AAC6 EFCE A508 899A B6E8 387A

To claim this, I am signing this object:

@HanSolo
HanSolo / CpuMemTileSkin.java
Last active September 17, 2019 14:40
TilesFX Skin to visualize CPU and Memory usage
import eu.hansolo.tilesfx.Tile;
import eu.hansolo.tilesfx.chart.ChartData;
import eu.hansolo.tilesfx.events.ChartDataEventListener;
import eu.hansolo.tilesfx.fonts.Fonts;
import eu.hansolo.tilesfx.skins.TileSkin;
import eu.hansolo.tilesfx.tools.CtxBounds;
import eu.hansolo.tilesfx.tools.Helper;
import javafx.beans.InvalidationListener;
import javafx.collections.WeakListChangeListener;
import javafx.geometry.Pos;
import eu.hansolo.fx.dotmatrix.DotMatrix;
import eu.hansolo.fx.dotmatrix.DotMatrix.DotShape;
import eu.hansolo.fx.dotmatrix.DotMatrixBuilder;
import eu.hansolo.fx.dotmatrix.Test;
import javafx.application.Application;
import javafx.concurrent.Service;
import javafx.concurrent.Task;
import javafx.geometry.HPos;
import javafx.geometry.Insets;
import javafx.geometry.Pos;
import eu.hansolo.tilesfx.Tile.SkinType;
import eu.hansolo.tilesfx.Tile.TileColor;
import eu.hansolo.tilesfx.tools.Location;
import javafx.application.Application;
import javafx.geometry.Insets;
import javafx.scene.Scene;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
import org.xml.sax.Attributes;
import org.xml.sax.SAXException;
@HanSolo
HanSolo / MedusaCompass.java
Last active February 2, 2016 16:37
Compass control with Medusa Gauge (needs Medusa > 3.1)
import eu.hansolo.medusa.Fonts;
import eu.hansolo.medusa.Gauge;
import eu.hansolo.medusa.Gauge.KnobType;
import eu.hansolo.medusa.Gauge.NeedleBehavior;
import eu.hansolo.medusa.Gauge.NeedleShape;
import eu.hansolo.medusa.Gauge.NeedleType;
import eu.hansolo.medusa.GaugeBuilder;
import javafx.animation.AnimationTimer;
import javafx.application.Application;
import javafx.collections.ObservableList;
07-06 16:25:29.482 1067-1089/eu.hansolo.healthtrack D/BluetoothLeScanner﹕ onScanResult() - ScanResult{mDevice=EC:3E:A1:B8:2C:3E, mScanRecord=ScanRecord [mAdvertiseFlags=4, mServiceUuids=null, mManufacturerSpecificData={76=[2, 21, -89, -82, 46, -73, 31, 0, 65, 104, -71, -101, -89, 73, -70, -63, -54, 100, 0, 1, 0, 1, -69, 80]}, mServiceData={}, mTxPowerLevel=-2147483648, mDeviceName=null], mRssi=-72, mTimestampNanos=7024043898743}
07-06 16:25:29.554 1067-1091/eu.hansolo.healthtrack D/BluetoothLeScanner﹕ onScanResult() - ScanResult{mDevice=DD:7A:EB:E8:28:59, mScanRecord=ScanRecord [mAdvertiseFlags=4, mServiceUuids=null, mManufacturerSpecificData={76=[2, 21, -89, -82, 46, -73, 31, 0, 65, 104, -71, -101, -89, 73, -70, -63, -54, 100, 0, 1, 0, 3, -69, 97]}, mServiceData={}, mTxPowerLevel=-2147483648, mDeviceName=null], mRssi=-79, mTimestampNanos=7024125671816}
07-06 16:25:29.845 1067-1173/eu.hansolo.healthtrack D/BluetoothLeScanner﹕ onScanResult() - ScanResult{mDevice=78:A5:04:71:7C:B9, mScanRecord=ScanReco