Skip to content

Instantly share code, notes, and snippets.

View thelmstedt's full-sized avatar

Tim Helmstedt thelmstedt

View GitHub Profile
@thelmstedt
thelmstedt / scraper_build.gradle
Created May 15, 2018 01:06
selenium as a jar
plugins {
id 'com.github.johnrengelman.shadow' version '1.2.3'
}
dependencies {
compile "org.seleniumhq.selenium:selenium-support:3.9.1"
compile "org.seleniumhq.selenium:selenium-api:3.9.1"
compile "org.seleniumhq.selenium:selenium-remote-driver:3.9.1"
compile "org.seleniumhq.selenium:selenium-chrome-driver:3.9.1"
compile "org.fluentlenium:fluentlenium-junit:3.5.2"
@thelmstedt
thelmstedt / build.gradle
Created May 15, 2017 23:45
Gradle setup for elasticsearch >= 5.x plugin dependencies
apply plugin: "java"
repositories {
mavenCentral()
ivy {
url "https://artifacts.elastic.co/downloads/elasticsearch-plugins/"
layout 'pattern', {
// https://artifacts.elastic.co/downloads/elasticsearch-plugins/analysis-phonetic/analysis-phonetic-5.4.0.zip
artifact '/[module]/[module]-[revision].[ext]'
}
@thelmstedt
thelmstedt / sensors-output.sh
Created September 12, 2016 00:50
history for lm_sensors
#!/usr/bin/env bash
./sensors-parse.sh | jq -Rc 'split(":") | map(. | ltrimstr(" ")) ' | jq -rs 'map(.[0]) | ["datetime"] + . | @tsv'
while true; do
sleep $1
./sensors-parse.sh | jq -Rc 'split(":") | map(. | ltrimstr(" ")) ' | jq --slurp -r 'map(.[1]) | [now | todateiso8601] + . | @tsv'
done
@thelmstedt
thelmstedt / TableViewWrappingBug.java
Last active August 29, 2015 14:18
JavaFX8 bug - wrapped cells in a TableView don't scroll correctly
import javafx.application.Application;
import javafx.application.Platform;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.scene.Group;
import javafx.scene.Scene;
import javafx.scene.control.TableCell;
import javafx.scene.control.TableColumn;
import javafx.scene.control.TableView;
import javafx.scene.control.cell.MapValueFactory;