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 openjdk:8 | |
ARG SONAR_VERSION | |
ENV SONARQUBE_HOME=/opt/sonarqube \ | |
SONARQUBE_JDBC_USERNAME=sonar \ | |
SONARQUBE_JDBC_PASSWORD=sonar \ | |
SONARQUBE_JDBC_URL="" \ | |
SONAR_VERSION=$SONAR_VERSION |
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
/** | |
* Utility class to handle checked exceptions in lambdas. | |
* <p> | |
* From <a href="http://stackoverflow.com/questions/27644361/how-can-i-throw-checked-exceptions-from-inside-java-8-streams">How can I throw CHECKED exceptions from inside Java 8 streams?</a>. | |
* This class helps to handle checked exceptions with lambdas. Example, with Class.forName method, which throws checked exceptions: | |
* </p> | |
* <pre> | |
* Stream.of("java.lang.Object", "java.lang.Integer", "java.lang.String") | |
* .map(rethrowFunction(Class::forName)) | |
* .collect(Collectors.toList()); |
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.File; | |
/** | |
* User: Eugene Dubrovka Date: 11/8/13 Time: 1:48 PM | |
*/ | |
public class JS { | |
private File hotfolder; | |
public JS(File dir) throws Exception { | |
init(dir); |
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 scala.annotation.tailrec | |
@tailrec def sumrec(sum: Int, current: Int, end: Int):Int = if (current > end) sum else sumrec(sum + current, current + 1, end) | |
def sum(start: Int, end: Int) = sumrec(0, start, end) | |
println(sum(1, 100)) |
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 | |
function filter_ignored_branches() { | |
local branches=$1 | |
local ignored=$2 | |
local result="" | |
for branch in $branches; do | |
if echo $ignored | grep -v $branch > /dev/null ; then | |
if [ "$INVERT" != "true" ]; then | |
result="$result $branch" | |
fi |