Skip to content

Instantly share code, notes, and snippets.

View jreijn's full-sized avatar

Jeroen Reijn jreijn

View GitHub Profile
import java.rmi.RemoteException;
import java.util.Map;
import java.util.TreeMap;
import javax.jcr.Node;
import javax.jcr.RepositoryException;
import javax.jcr.Session;
import org.hippoecm.repository.api.MappingException;
import org.hippoecm.repository.api.WorkflowContext;
@jreijn
jreijn / logstash-haproxy.conf
Created March 6, 2013 11:08
Logstash configuration file that allows you to parse an old file with the correct timestamps via: "nc localhost 3333 < yourlogfile.log "
input {
tcp {
type => "haproxy"
port => 3333
}
}
filter {
grok {
type => "haproxy"
@jreijn
jreijn / hippo-kibana-dashboard.json
Last active December 18, 2015 19:09
Hippo Kibana dashboard
{
"title": "Hippo Campus Experience Optimizer with Relevance for Targeting",
"services": {
"query": {
"idQueue": [
1,
2,
3,
4
],
@jreijn
jreijn / .bash_aliases
Created December 30, 2014 10:45
Switch JDK on MacOSX
#java
alias java6='export JAVA_HOME=`/usr/libexec/java_home --version 1.6`'
alias java7='export JAVA_HOME=`/usr/libexec/java_home --version 1.7`'
alias java8='export JAVA_HOME=`/usr/libexec/java_home --version 1.8`'
@jreijn
jreijn / keybase.md
Created September 5, 2017 12:37
keybase.md

Keybase proof

I hereby claim:

  • I am jreijn on github.
  • I am jreijn (https://keybase.io/jreijn) on keybase.
  • I have a public key ASBy-BI83D6Zy900U1-X-CS1t11m2ezInErmhuEVUotViAo

To claim this, I am signing this object:

@jreijn
jreijn / EntityResource.java
Created May 9, 2018 22:37
IntelliJ Live template for Spring REST TDD demo
package ${PACKAGE_NAME};
import org.springframework.hateoas.Link;
import org.springframework.hateoas.Resource;
public class ${NAME} extends Resource<${ENTITY}> {
public ${NAME}(${ENTITY} content, Link... links) {
super(content, links);
}
@jreijn
jreijn / AppRunner.java
Last active August 25, 2021 13:47
App Runner CDK
public ECRBasedAppRunnerService(Construct scope, String id, Role role) {
super(scope, id);
CfnService.HealthCheckConfigurationProperty healthCheckConfigurationProperty =
new CfnService.HealthCheckConfigurationProperty.Builder()
.path("/actuator/health")
.protocol("HTTP")
.interval(10)
.timeout(5)
.healthyThreshold(5)
@jreijn
jreijn / Function.java
Last active March 12, 2024 10:36
Read File from S3 in Java
public static final String TYPE_QUERY_PARAM = "type";
public static final String JSON_FILE_EXTENSION = ".json";
public static final String PAGE_PREFIX = "_p";
private S3Client s3Client = S3Client.builder()
.region(Region.EU_WEST_1)
.httpClient(UrlConnectionHttpClient.builder().build())
.credentialsProvider(EnvironmentVariableCredentialsProvider.create())
.build();