Skip to content

Instantly share code, notes, and snippets.

@daniele-pecora
daniele-pecora / MyConcurrentJob.java
Created November 16, 2015 13:09
Creating a concurrently running task with java
import java.util.concurrent.Executors;
/**
* Using javas {@link java.util.concurrent.ExecutorService ExecutorService} to run an action concurrently
*/
public class MyConcurrentJob{
public void justDoIt(){
Runnable action = () -> {
try {
// do whatever you like to do here...
@daniele-pecora
daniele-pecora / gist:9383ee242c26bafac2b5
Last active November 13, 2015 09:33
InitDB Arguments missing to make german umlauts work
public class PostgresProcess extends AbstractPGProcess<PostgresExecutable, PostgresProcess> {
...
@Override
protected void onBeforeProcess(IRuntimeConfig runtimeConfig)
throws IOException {
super.onBeforeProcess(runtimeConfig);
PostgresConfig config = getConfig();
runCmd(config, InitDb, "Success. You can now start the database server using", 1000,
/**
* Need this arguments here