Skip to content

Instantly share code, notes, and snippets.

Doing questionable things with computers

Sean Reilly seanjreilly

Doing questionable things with computers
View GitHub Profile
seanjreilly / junit5.xml
Last active Jan 31, 2020
An IntelliJ live template for JUnit5 unit tests in Java.
View junit5.xml
<templateSet group="JUnit5">
<template name="test" value="@org.junit.jupiter.api.Test&#10;@org.junit.jupiter.api.DisplayName(&quot;$name$&quot;)&#10;void $method$() throws Exception {&#10; $END$&#10;}" description="JUnit 5 test" toReformat="true" toShortenFQNames="true" useStaticImport="true">
<variable name="name" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="method" expression="camelCase(name)" defaultValue="" alwaysStopAt="false" />
<option name="JAVA_DECLARATION" value="true" />
seanjreilly /
Created Jul 1, 2015
Pattern for ensuring that an optional collection passed into an argument is immutable
import java.util.Optional;
import java.util.LinkedHashSet;
import java,util.Collections;
public final class Foo {
private final Optional<Set<String>> args;
public Foo(Optional<Set<String>> args) {
this.args =;
seanjreilly / gist:086968ab04fbb339b562
Created Aug 8, 2014
Gradle error message with Java 1.8 and -parameters
View gist:086968ab04fbb339b562
* What went wrong:
Execution failed for task ':test'.
> failed to read class file /Users/sreilly/Projects/gradle-parameters-bug/build/classes/test/TheTest.class
* Try:
Run with --info or --debug option to get more log output.
* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':test'.
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(
seanjreilly / gist:ea406fad59300c422c16
Created Jul 8, 2014
stack trace trying to use the mutability detector on a class with a field of java.time.Instant
View gist:ea406fad59300c422c16
An unhandled error occurred. Please read message at end of this output.
Class being analysed: com.equalexperts.logging.LogicalLogRecord
Checker that failed: MutableTypeToFieldChecker
Classes analysed so far:
An unhandled error occurred. This is probably my fault, not yours, and I am sorry.
I'd love to get an opportunity to fix this, please report as an issue at:

Keybase proof

I hereby claim:

  • I am seanjreilly on github.
  • I am seanjreilly ( on keybase.
  • I have a public key whose fingerprint is D37F FF5A 6E53 A7FC 6D34 A756 22FD D581 1EDE 915E

To claim this, I am signing this object:

seanjreilly / gist:8630838
Created Jan 26, 2014
The boiler plate virtual box config section for a Vagrantfile
View gist:8630838
# Provider-specific configuration so you can fine-tune various
# backing providers for Vagrant. These expose provider-specific options.
# Example for VirtualBox:
config.vm.provider :virtualbox do |vb|
# Don't boot with headless mode
#vb.gui = false
# Use VBoxManage to customize the VM. For example to change memory:
# vb.customize ["modifyvm", :id, "--memory", "1024"]
seanjreilly / gist:6183722
Created Aug 8, 2013
Stack trace trying to use the rpm plugin with gradle 1.7
View gist:6183722
FAILURE: Build failed with an exception.
* Where:
Script '/Users/sreilly/Projects/XXX/build.gradle' line: XXX
* What went wrong:
A problem occurred evaluating script.
> Could not create task of type 'Rpm'.
* Try: