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.*; | |
import java.util.stream.Collectors; | |
import java.util.stream.IntStream; | |
class TestSigleNumberInArray { | |
public static void main(String[] args) { | |
System.out.println("Start generation"); | |
var lotsOfIntegers = IntStream.rangeClosed(1, 12312300) | |
.boxed() | |
.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
@MockBean | |
protected TelemetryClient telemetryClient; | |
@AfterEach | |
public void showInteractions() { | |
System.out.println(mockingDetails(telemetryClient).getInvocations()); | |
} |
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
# MacOs | |
brew install cfssl jq | |
az login | |
az devops configure --defaults organization=https://dev.azure.com/your-org | |
az devops configure --defaults project=your-project | |
az repos list # say yes | |
az repos list | jq -c '.[].sshUrl' | xargs -L 1 git clone |
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
drop table if exists test_table; | |
create table test_table ( | |
id int default 0 not null primary key, | |
name text null | |
); | |
insert into test_table (id, name) | |
values (1, 'First'); |
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
docker run -e _JAVA_OPTIONS='-XX:+PrintFlagsFinal -XX:MaxRAMPercentage=80.0' --rm -p 1080:1080 mockserver/mockserver |
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 jobs = [ | |
jobA: [ | |
var1: 'var1 JobA' | |
], | |
jobB: [ | |
var1: 'var1 JobB' | |
], | |
jobC: [ | |
var1: 'var1 JobC' | |
], |
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
yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm | |
yum install htop |
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
applicationVersion = sh returnStdout: true, script: "mvn -q help:evaluate -Dexpression=project.version -DforceStdout -Drevision=${APPLICATION_REVISION}" |
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
public class Math { | |
public static int pow(int number, int exponent) { | |
return (int) java.lang.Math.pow(number, exponent); //just for lazy men ^_^ | |
} | |
public static double mean(double... data) { | |
double sum = 0; | |
int length = data.length; | |
for (int i = 0; i < length; i++) { |
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.ArrayList; | |
import java.util.List; | |
/** | |
* @author <a href="mailto:khomenko.dp@gmail.com">Oleksandr Khomenko</a> | |
* <br> | |
*/ | |
public class AreYouGeneric { | |
public static void main(String[] args) { |
NewerOlder