Skip to content

Instantly share code, notes, and snippets.

View TWiStErRob's full-sized avatar

Róbert Papp TWiStErRob

View GitHub Profile
@TWiStErRob
TWiStErRob / Example.java
Last active February 11, 2017 22:42
JUnit Jupiter extension for creating JFixture objects into tests
public class Example {
public static <T1, T2> Predicate<Pair<T1, T2>> expand(BiPredicate<? super T1, ? super T2> func) {
return objects -> func.test(objects.getValue0(), objects.getValue1());
}
}
@TWiStErRob
TWiStErRob / protractorAPICheatsheet.md
Last active October 27, 2017 21:25 — forked from ajambrovic/protractorAPICheatsheet.md
Protractor API Cheatsheet
@TWiStErRob
TWiStErRob / build.gradle
Created February 9, 2019 00:43
Automatically add `dagger.formatGeneratedSource` if `dagger-compiler` is present in `annotationProcessor` configuration.
allProjects { project ->
tasks.withType(JavaCompile).configureEach { JavaCompile task ->
task.doFirst {
// annotationProcessorPath is populated around afterEvaluate, but can't use that in configureEach
if (hasDagger(task.options.annotationProcessorPath)) {
task.options.compilerArgs += [
// disable formatting, why wait if it looks almost the same?!
'-Adagger.formatGeneratedSource=disabled'
]
}
@TWiStErRob
TWiStErRob / README.md
Last active June 12, 2023 00:21
Kotlin Script (kts) 1.3.21 with dependencies to call a JSON web endpoint, including tests