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 kotlin.collections.List | |
fun List<Int>.produto(): Int { | |
var product = 1 | |
for (element in this) { | |
product *= element | |
} | |
return product | |
} |
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
#!/bin/bash | |
PASTA_ORIGEM=/usr/share/deploy_producao/deploy_novo | |
TOMCAT_HOME=/usr/local/tomcat | |
TEMPO_SLEEP=20 | |
PASTA_EXECUTADOS=/usr/share/deploy_producao/deploy_executado | |
LOG_FILE=/usr/share/deploy_producao/deploy_producao.log | |
#Verifica se foi passado algum nome de war por parametro. | |
#Quando isso acontecer, só será feito deploy deste war. |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
#i::UpTomcatPrincipal() ;Win+i | |
#k::DownUpTomcatPrincipal() ;Win+k | |
UpTomcatPrincipal(){ | |
OpenEclipse() | |
UpTomcat() | |
OpenPage() | |
} | |
DownUpTomcatPrincipal(){ |
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
#!/bin/bash | |
AGORA_XML=$(wget -qO- "http://api.timezonedb.com/?zone=America/Sao_Paulo&key=<SUA-KEY-API>") | |
AGORA_XML_STATUS=$(grep -oPm1 "(?<=<status>)[^<]+" <<< "$AGORA_XML") | |
# Script de atualização de data por API externa do site timezonedb.com | |
# | |
#Se o site estiver fora do ar deverá terminar o processo | |
if [ "$AGORA_XML_STATUS" != "OK" ]; then |