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 sbt._ | |
class LiftProject(info: ProjectInfo) extends DefaultWebProject(info) { | |
val liftVersion = property[Version] | |
// uncomment the following if you want to use the snapshot repo | |
// val scalatoolsSnapshot = ScalaToolsSnapshots | |
// If you're using JRebel for Lift development, uncomment | |
// this 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
{ | |
"cmd": ["coffee", "$file"], | |
"selector" : "source.coffee", | |
"path" : "/usr/local/bin" | |
} |
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
def countSum(numbers: List[Int], expectedResult: Int): Int = { | |
countSumRecursively(numbers, 0, expectedResult); | |
} | |
def countSumRecursively(numbers: List[Int], currentResult: Int, expectedResult: Int): Int = { | |
if (currentResult == expectedResult) | |
1 | |
else if ((currentResult > expectedResult) || (numbers.isEmpty)) | |
0 | |
else |
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
Number.prototype.roundup= function(dec){ | |
if(this.toFixed(dec) < value) | |
return window.parseFloat(this.toFixed(dec))+(1/(Math.pow(10,dec))); | |
else | |
return window.parseFloat(this.toFixed(dec)); | |
} |
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
//Date Util | |
Date.prototype.getYearGap = function(){ | |
var ret = new Date(this.getTime()); | |
return this.getFullYear() - ret.getFullYear(); | |
}; | |
Date.prototype.getStartOfMonth = function(){ | |
var ret = new Date(this.getTime()); | |
ret.setDate(1) | |
return ret; | |
}; |
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
//classe Base64 | |
public class Base64 { | |
/* ******** P U B L I C F I E L D S ******** */ | |
/** No options specified. Value is zero. */ | |
public final static int NO_OPTIONS = 0; | |
/** Specify encoding in first bit. Value is one. */ |
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
function fat(x) { | |
if (x == 0 || x == 1) { | |
return 1; | |
} | |
return fat(x - 1) * x; | |
} | |
var quadrado = function(x) { | |
return x * x; | |
}; |
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
FROM jenkins | |
# if we want to install via apt | |
USER root | |
RUN curl -sL https://deb.nodesource.com/setup_5.x | bash - | |
RUN apt-get install -y nodejs | |
EXPOSE 8080 | |
EXPOSE 50000 | |
EXPOSE 9090 | |
EXPOSE 9091 |
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
upstream yoursiteName { | |
server 127.0.0.1:9090 max_fails=1; | |
server 127.0.0.1:9091 max_fails=3 backup; | |
server 127.0.0.1:9090 max_fails=3 fail_timeout=600s backup; | |
} | |
server { | |
listen 80; | |
server_name www.yoursite.com.br yoursite.com.br; | |
access_log /var/log/yoursite.access.log main; |
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 jenkinsHelper | |
const jenkinsDeployerManager = require("deploy-blue-green-helper-jenkins"); | |
//Create your jenkinsOptions configuration | |
const jenkinsOptions = { | |
debug: false, | |
jenkinsUrl: "http://192.168.99.100:8081/" | |
}; | |
//Create your blueOptions configuration | |
const blueOptions = { |
OlderNewer