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.math.BigDecimal; | |
import java.util.Arrays; | |
import java.math.RoundingMode; | |
public class ExemplosEnums { | |
public static void main(String args[]) { | |
final BigDecimal salario = new BigDecimal(100000l); | |
System.out.println("Imposto: " + CalculadoraImpostoDeRenda.INSTANCE.calcular(salario)); |
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
cat MANIFEST.MF | grep 'Implementation-Version' | cut -d ':' -f 2 |
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
# JDK 7 | |
-Dcom.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.dump=true | |
-Dcom.sun.xml.internal.ws.transport.http.HttpAdapter.dump=true | |
-Dcom.sun.xml.internal.ws.transport.http.HttpAdapter.dumpTreshold=999999 | |
# JDK 8 | |
-Dcom.sun.xml.ws.transport.http.client.HttpTransportPipe.dump=true | |
-Dcom.sun.xml.ws.transport.http.HttpAdapter.dump=true | |
-Dcom.sun.xml.ws.transport.http.HttpAdapter.dumpTreshold=999999 |
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
netstat -nr | grep '^0\.0\.0\.0' | awk '{print $2}' |
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 | |
LOCAL_PATH="$(pwd)" | |
MERGE_URL="" | |
DIRS=`ls -l --time-style="long-iso" $LOCAL_PATH | egrep '^d' | awk '{print $8}'` | |
BASEDIR=$(basename $LOCAL_PATH) | |
svnMerge(){ | |
local branch=$1 | |
echo "##########################################################################################" |
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
# Original from http://blog.ruilopes.com/testing-the-elasticsearch-cluster-behavior-under-network-failure.html | |
# See https://github.com/victorfranz/elasticsearch/ | |
# create folders | |
for i in 0 1 2; do | |
mkdir -p elasticnode$i/{data,work,logs,plugins,config} | |
done | |
# run docker containers | |
for i in 0 1 2; do | |
docker run -d \ |