Skip to content

Instantly share code, notes, and snippets.

View shemnon's full-sized avatar

Danno Ferrin shemnon

View GitHub Profile
@shemnon
shemnon / gist:3711882
Created September 13, 2012 04:37
Annotated Styleable CSS Musing
// Approach A - Just annotate the property method
StyleableDoubleProperty size = new StyleableDoubleProperty(this, "size", 1.0);
StyleableDoubleProperty weight = new StyleableDoubleProperty(this, "weight", 200);
@Styleable("-x-weight", initial="200pt")
public DoubleProperty weightProperty() {return weight;}
@Styleable("-x-size")
public StyleableDoubleProperty sizeProperty() {return size;}
@shemnon
shemnon / build-from-snapshot.gradle
Created November 8, 2012 04:58
Installing the JavaFX Gradle Plugin
apply from: 'https://repository-javafx-gradle-plugin.forge.cloudbees.com/snapshot/javafx.plugin'
@shemnon
shemnon / build.gradle
Created January 16, 2013 18:14
BinTray configuration in Gradle
/* SNIP */
uploadArchives {
repositories {
mavenDeployer {
repository(
url:"https://api.bintray.com/maven/shemnon/javafx-gradle/plugin/",
id: 'bintray-shemnon-javafx-gradle-plugin'
) {
try {
@shemnon
shemnon / gist:4652761
Created January 28, 2013 03:20
RT-26719
import javafx.application.Application;
import javafx.scene.Node;
import javafx.scene.SceneBuilder;
import javafx.scene.control.ScrollPane;
import javafx.scene.control.ScrollPaneBuilder;
import javafx.scene.control.SplitPane;
import javafx.scene.control.SplitPaneBuilder;
import javafx.scene.layout.Region;
import javafx.scene.layout.VBox;
import javafx.scene.text.Text;
@shemnon
shemnon / gist:5552255
Last active December 17, 2015 04:39
SwingNode: A JTable in a JavaFX Stage
import javafx.animation.Interpolator;
import javafx.animation.KeyFrame;
import javafx.animation.KeyValue;
import javafx.animation.TimelineBuilder;
import javafx.application.Application;
import javafx.embed.swing.*;
import javafx.geometry.Pos;
import javafx.scene.Node;
import javafx.scene.Scene;
import javafx.scene.control.Button;
@shemnon
shemnon / ColoredTextRow.java
Created November 20, 2013 04:01
Color text backgrounds
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.layout.FlowPane;
import javafx.scene.layout.VBox;
import javafx.scene.text.Text;
import javafx.stage.Stage;
/**
* Created by shemnon on 19 Nov 2013.
*/
@shemnon
shemnon / Id.java
Last active August 29, 2015 14:02 — forked from posita/Id.java
/*======================================================================*\
ICBIaW50OiBtYWtlIHRoaXMgYXMgY2xvc2UgdG8gcHJvZHVjdGlvbi1yZWFkeSBzb3VyY2
UgY29kZSBhcyB5b3UgY2FuIQ0KICANCiAgQm9udXMgcG9pbnRzIGZvciB0ZWxsaW5nIHVz
IHdoYXQgdGhpcyBkb2VzOg0KDQogICAgJycuam9pbihpdGVydG9vbHMuY2hhaW4oKnppcC
hzWy0yOjotMl0sIHNbOjotMl0pKSkNCg0KPj4gSXQgcmV2ZXJzZXMgdGhlIHN0cmluZyBp
biBwYWlycy4gIA0KPj4gSWYgdGhlIHN0cmluZyBpcyBvZGQgbGVuZ3RoIHRoZW4gdGhlIG
ZpcnN0IGNoYXJhY3RlciBpcyByZXZlcnNlZC4gIFRoZW4gZWFjaCBjaGFyYWN0ZXIgaXMg
cGFpcmVkLCB0aGVuIHRoZSBwYWlycyBhcmUgcmV2ZXJzZWQuDQoNCiAgKlN1cGVyKiBib2
51cyBwb2ludHMgZm9yIGZpbmQgdGhlIGJ1ZyBpbiB0aGlzIGNvZGU6DQogIA0KICAgIGh0
dHA6Ly9wYXN0ZS5wb3VuZC1weXRob24ub3JnL3Nob3cvdTE2eFVSS1JGWnVOaHdzV214SU
#!/usr/bin/env python
import time
import RPi.GPIO as GPIO
# set MAXM race time, times out after this if all cars don't finish
max_race_time = 20
#set input gpio pin numbers
LaneOne = 16 #GPIO23
LaneTwo = 18 #GPIO24
@shemnon
shemnon / DemoClass.java
Last active October 4, 2018 15:10
Comparison of property access patterns and JVM language integrations.
package com.example.java;
public class DemoClass {
public String fieldProperty = "init";
private String _cppProperty = "init";;
private String _javaProperty = "init";;
public String cppProperty() {
return _cppProperty;
@shemnon
shemnon / log4j2-rollingdebug.xml
Created December 12, 2018 17:45
Pantheon Log4J rolling debug to a file
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="warn" name="MyApp" packages="">
<Properties>
<Property name="root.log.level">DEBUG</Property>
</Properties>
<Appenders>
<RollingFile name="RollingFile" fileName="debug.log"
filePattern="debug-%i.log">
<PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss.SSSZZZ} | %t | %-5level | %c{1} | %msg%n"/>