Skip to content

Instantly share code, notes, and snippets.

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

Thomas Darimont thomasdarimont

🏠
Working from home
View GitHub Profile
with
base_data as
(
select
alm.*
, dd.day
, dd.hour
, dd.minute
, dd.hourminute
from
@thomasdarimont
thomasdarimont / HelloWorld.java
Last active October 11, 2022 18:44
HelloWorld in Java without using a "." character
import static java.lang.String.valueOf;
import static java.util.Arrays.fill;
/**
* Author: Thomas Darimont
*/
public interface HelloWorld {
static void main(String[] args) {
@XmlType(name = "\n\n\tHello World!\n\n")
class Con {}
public class ConHW{}
@thomasdarimont
thomasdarimont / 001_BusinessService.java
Last active August 29, 2015 14:06
How to overwrite nested dependencies for an integration test.
package demo.business;
public interface BusinessService {
void businessMethod();
}
@thomasdarimont
thomasdarimont / ProxyProblemExample.java
Last active May 28, 2023 20:43
Hack for allowing dedicated proxy settings to be used for URL with http and https protocol handling in JavaFXs Webkit based WebView. Tested with JDK8
package de.tutorials.training.fx.proxy;
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.layout.StackPane;
import javafx.scene.web.WebEngine;
import javafx.scene.web.WebView;
import javafx.stage.Stage;
import java.net.InetSocketAddress;
@thomasdarimont
thomasdarimont / xd-dsl.groovy
Created October 14, 2014 11:04
PoC Sketch of an DSL for XD.
class Event{
long ts;
int h;
int hh;
int p;
int property;
double value;
}
class LoadEvent extends Event{
package bob.asm;
/**
* @author Thomas Darimont
*/
public interface BeanAccessor {
Object getProperty(String name);
void setProperty(String name, Object value);
@thomasdarimont
thomasdarimont / Readme.md
Last active August 29, 2015 14:07
Simple monitoring application. Watches for the existence of a process and automatically restarts it if missing or kills it if it is not wanted. Configurable via a control-file.

#Usage

appmonitor "logical_app_name" "complete start command" "complete kill command" "path to control file"

#Example

appmonitor "calculator" "/Applications/Calculator.app/Contents/MacOS/Calculator" "pkill -9 'Calculator'" "/tmp/calculator.control"

If you're coming to the Property-Based TDD As If You Meant It Workshop, you will need to bring a laptop with your favourite programming environment, a property-based testing library and, depending on the language, a test framework to run the property-based-tests.

Any other languages or suggestions? Comment below.

.NET (C#, F#, VB)

Python:

@thomasdarimont
thomasdarimont / sdjpa.support-not-contains.patch
Created October 20, 2014 18:30
Prototypic support for NotContaining part expression for Spring Data JPA.
Mon Oct 20 20:28:24 2014 +0200 5a416d0 (HEAD, feature/support-not-contains) DATAJPA-XXX - Add support for notContains in derived queries.  [Thomas Darimont]
diff --git a/pom.xml b/pom.xml
index bbe0973..c49b1cc 100644
--- a/pom.xml
+++ b/pom.xml
@@ -27,7 +27,7 @@
<hsqldb1>1.8.0.10</hsqldb1>
<jpa>2.0.0</jpa>
<openjpa>2.3.0</openjpa>
- <springdata.commons>1.10.0.BUILD-SNAPSHOT</springdata.commons>