This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.kenshoo.xlsx2csv.XlsxToCsvConverter; | |
import java.io.*; | |
public class Converter { | |
private final static String SOURCE_FILE_PATH = "/path/example-input.xslx" | |
private final static String DEST_FILE_NAME = "/path/example-result.csv" | |
//building a new converter with default parameters | |
private final XlsxToCsvConverter xlsxToCsvConverter = new XlsxToCsvConverter.Builder().build(); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############################# Filebeat ###################################### | |
filebeat: | |
prospectors: | |
- | |
paths: | |
- /var/log/<APP>/app.log | |
fields: | |
logzio_codec: plain | |
token: ${token} | |
application: app # Custom field and value (can be filtered in logz.io) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.IOException; | |
import java.util.Vector; | |
/** | |
* Created by moshee | |
* on: 07/06/17 | |
* to compile in place: `javac ConsumeHeap.java` | |
* Execute: `java -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/var/log/app-`date +%s`-pid$$.hprof -XX:OnOutOfMemoryError=/opt/app/bin/upload_dump_s3.sh -Xmx2m ConsumeHeap` | |
* HeapDumpOnOutOfMemoryError specifies to automatically create a dump when OOM occures | |
* HeapDumpPath supplies a path to put that file |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
test { | |
testLogging.showStandardStreams = true | |
testLogging.exceptionFormat = 'full' | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apply plugin: 'java' //needs this to have test task defined | |
test { | |
println "Host system properties" | |
System.properties.each { k,v-> | |
println "$k = $v" | |
} | |
systemProperty 'db.test.mode', System.getProperty("db.test.mode", "EMBEDDED") | |
println "Gradle system properties" | |
systemProperties.each { k,v-> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"AWSEBDockerrunVersion": 2, /* newer multi container format */ | |
"authentication": { | |
/* if working with non ECR or non public docker registries, this is required, points to file in S3, | |
that has the correct auth data, this could hold auth for multiple registries, | |
see here: http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_docker.container.console.html#docker-images-private | |
*/ | |
"bucket": "s3-bucket-name", | |
"key": "prefix" | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package integration; | |
import com.kenshoo.trackingfront.configuration.RabbitConfiguration; | |
import com.kenshoo.trackingfront.rabbitmq.RabbitConnectionFactory; | |
import com.rabbitmq.client.Connection; | |
import com.rabbitmq.client.ConnectionFactory; | |
import org.junit.*; | |
import org.junit.rules.ExpectedException; | |
import static org.mockito.Matchers.anyString; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package rules; | |
import com.google.common.collect.ImmutableMap; | |
import org.eclipse.jdt.launching.SocketUtil; | |
import java.util.HashMap; | |
import java.util.Map; | |
/** | |
* Created with IntelliJ IDEA. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package rules; | |
import com.google.common.collect.Lists; | |
import com.google.common.collect.Maps; | |
import com.spotify.docker.client.DefaultDockerClient; | |
import com.spotify.docker.client.DockerClient; | |
import com.spotify.docker.client.DockerException; | |
import com.spotify.docker.client.messages.ContainerConfig; | |
import com.spotify.docker.client.messages.ContainerCreation; | |
import com.spotify.docker.client.messages.HostConfig; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protected Integer getBuildNumber() { | |
try { | |
final String version = App.class.getPackage().getImplementationVersion(); | |
if (StringUtils.isNotEmpty(version)) { | |
try { | |
return Integer.parseInt(version.substring(version.lastIndexOf(".") + 1)); | |
} catch (Exception exp) { | |
logger.error("Problem parsing buildnumber from package version, returning 0", exp); | |
} | |
} |