Skip to content

Instantly share code, notes, and snippets.

View shnplr's full-sized avatar
🏠
Working from home

shnplr

🏠
Working from home
  • Sydney
View GitHub Profile
@shnplr
shnplr / ComboSample.java
Last active August 29, 2015 14:22
Problem with Cursor WAIT binding and ComboBox
package sample;
import javafx.application.Application;
import javafx.beans.binding.Bindings;
import javafx.beans.property.ObjectProperty;
import javafx.beans.property.SimpleObjectProperty;
import javafx.concurrent.Task;
import javafx.scene.Cursor;
import javafx.scene.Scene;
import javafx.scene.control.ComboBox;
@shnplr
shnplr / ObservableAppender.java
Last active December 22, 2015 12:52
JavaFX - log4j appender that logs to observable string property
package com.sample;
import javafx.application.Platform;
import javafx.beans.property.SimpleStringProperty;
import javafx.beans.property.StringProperty;
import javafx.beans.value.ChangeListener;
import org.apache.log4j.AppenderSkeleton;
import org.apache.log4j.Layout;
import org.apache.log4j.spi.LoggingEvent;
@shnplr
shnplr / pipeline.gdsl
Last active April 8, 2020 08:58
OpenShift Jenkins Client Plugin Intellij GDSL
//The global script scope
def ctx = context(scope: scriptScope())
//What things can be on the script scope
contributor(ctx) {
method(name: 'echo', type: 'java.lang.Object', params: [message: 'java.lang.String'], doc: 'Print Message')
method(name: 'node', type: 'java.lang.Object', params: [body: 'Closure'], doc: 'Allocate node')
method(name: 'node', type: 'java.lang.Object', params: [label: 'java.lang.String', body: 'Closure'], doc: 'Allocate node')
method(name: 'pipeline', type: 'java.lang.Object', params: [body: 'Closure'], doc: 'Pipeline root element')
property(name: 'params', type: 'org.jenkinsci.plugins.workflow.cps.ParamsVariable')