This file contains 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
new File("/path/to/base/dir").eachDirRecurse { | |
if (it.isDirectory() && !it.list().length) new File("$it.absolutePath/PLACEHOLDER") << '' | |
} |
This file contains 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.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) |
This file contains 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
void setup() { | |
size(1024, 768); | |
smooth(); | |
} | |
void draw(){ | |
if (mousePressed) { | |
fill(0); | |
} else { | |
fill(255); |
This file contains 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
/** | |
* @author Javier Ramirez | |
* <[email protected]> | |
* Date: 19/06/12 | |
* Time: 22:30 | |
* www.javamexico.org | |
*/ | |
package org.javamexico.jm2.usuarios |
This file contains 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 codingdojo.numerosprimos; | |
/** | |
* @author benek | |
* Date: 12/01/12 | |
* Time: 20:57 | |
* www.javamexico.org | |
*/ | |
public class NumerosPrimos { |
This file contains 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
@Override | |
public String toString() { | |
def s = new StringBuilder() | |
this.properties.each { | |
s.append("$it.key: $it.value\n") | |
} | |
return s.toString() | |
} |
This file contains 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
/** | |
* Author: Javier Alberto Ramirez Hernandez | |
* Date: 03/12/12 | |
* Time: 10:39 | |
* SintelTI.mx | |
*/ | |
def basePath = '/base/path' | |
def convertLine(String line) { |
This file contains 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
#!/bin/bash | |
# Shell script para cambiar la versión de Grails en el PATH | |
echo "Cambiando versión de Grails en variable PATH..." | |
if [ "$1" = "1.3" ] ; then | |
echo "Cambiando a versión 1.3.7..." | |
export GRAILS_HOME=/Users/benek/Downloads/grails-1.3.7 | |
elif [ "$1" = "1.2" ] ; then | |
echo "Cambiando a versión 1.3.7..." | |
export GRAILS_HOME=/Users/benek/Downloads/grails-1.2-M3 |
This file contains 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 spock.lang.Specification | |
import org.springframework.validation.FieldError | |
/** | |
* @author Javier Ramirez | |
* <[email protected]> | |
* Date: 30/06/12 | |
* Time: 17:29 | |
* www.javamexico.org | |
* |
This file contains 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.BufferedReader; | |
import java.io.IOException; | |
import java.io.InputStreamReader; | |
import java.io.PrintWriter; | |
import java.net.Socket; | |
public class SocketClient { | |
public static void main(String[] args) throws IOException { |
OlderNewer