Skip to content

Instantly share code, notes, and snippets.

View benek's full-sized avatar

Javier Benek benek

View GitHub Profile
@benek
benek / SingleThreadExecutorScript.groovy
Created August 29, 2011 19:52
Testing SingleThreadExecutor
import java.util.concurrent.ExecutorService
import java.util.concurrent.Executors
ExecutorService executor = Executors.newSingleThreadExecutor()
10.times {
executor.execute(new Runnable(){
public void run(){
println "Inicio"
Thread.sleep(1000)
@benek
benek / placeholders.groovy
Created July 11, 2011 04:56
Just a simple Groovy script for creating placeholders...
new File("/path/to/base/dir").eachDirRecurse {
if (it.isDirectory() && !it.list().length) new File("$it.absolutePath/PLACEHOLDER") << ''
}