Skip to content

Instantly share code, notes, and snippets.

View oers's full-sized avatar

oers oers

  • EBP Deutschland GmbH
  • Berlin
  • 13:10 (UTC +02:00)
View GitHub Profile
@MaciejDobrowolski
MaciejDobrowolski / MultipleAxesLineChart.java
Last active February 17, 2024 20:20
This is try to implement multiple axes line chart in JavaFX. Being little cumbersome to use, it allows you to have a number of axes with series "binded" to single LineChart. The main restrictions are: All axes should have the same width (it is assumed to be 60px). Any additional axes will appear at the right side of LineChart. You should know wh…
package macko;
import javafx.beans.Observable;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.geometry.Pos;
import javafx.geometry.Side;
import javafx.scene.Cursor;
import javafx.scene.Node;
import javafx.scene.chart.Axis;
@rb2k
rb2k / gist:8372402
Last active April 15, 2024 19:30
A jenkins script to clean up workspaces on slaves
// Check if a slave has < 10 GB of free space, wipe out workspaces if it does
import hudson.model.*;
import hudson.util.*;
import jenkins.model.*;
import hudson.FilePath.FileCallable;
import hudson.slaves.OfflineCause;
import hudson.node_monitors.*;
for (node in Jenkins.instance.nodes) {
@OrganicPanda
OrganicPanda / hacky-scrollbar-resize-listener.js
Last active April 7, 2024 10:53
A sham that will throw a window resize event even when scrollbars are added/removed (this is not something the standard window resize event does). Tested in IE9+, Chrome & Firefox latest.
// Demo: http://jsfiddle.net/pFaSx/
// Create an invisible iframe
var iframe = document.createElement('iframe');
iframe.id = "hacky-scrollbar-resize-listener";
iframe.style.cssText = 'height: 0; background-color: transparent; margin: 0; padding: 0; overflow: hidden; border-width: 0; position: absolute; width: 100%;';
// Register our event when the iframe loads
iframe.onload = function() {
// The trick here is that because this iframe has 100% width