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
version: '2.2' | |
networks: | |
traefik: | |
external: true | |
guacamole: | |
external: true | |
services: | |
guacamole: |
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
/** | |
* Check comparator respects its contract against a given collection. | |
* | |
* @param elements | |
* collection | |
* @param comparator | |
* comparator | |
*/ | |
public static <T> void checkComparatorContract(Collection<T> elements, Comparator<? super T> comparator) { |
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
.vagrant |
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 | |
# Trap signals | |
for signal in HUP INT QUIT ABRT KILL SEGV USR1 USR2 TERM; do | |
trap "echo 'master : Received signal ${signal}...'" ${signal} | |
done | |
# Submit slaves | |
slave_id=0; while read host slots queue procs; do | |
for slot in $(seq $slots); do |
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 ArrayListAddBenchmark extends ListBenchmark { | |
@Override | |
protected List<Object> newInstance() { | |
return new ArrayList<Object>(); | |
} | |
} |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<project xmlns="http://maven.apache.org/POM/4.0.0" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<!-- Benchmark code goes into src/test/java --> | |
<dependencies> | |
<dependency> |
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 | |
# Get temp dir | |
tmpdir=$(mktemp -d) | |
# Generate test | |
cat > ${tmpdir}/ListenToSignal.java <<EOF | |
import sun.misc.Signal; | |
import sun.misc.SignalHandler; | |
public class ListenToSignal { |
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/sh | |
cat > PrintAvailableProcs.java <<EOF | |
public class PrintAvailableProcs { | |
public static void main(String[] args) { | |
System.out.println(Runtime.getRuntime().availableProcessors()); | |
} | |
} | |
EOF | |
javac PrintAvailableProcs.java |
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/sh | |
# Looks for /tmp/hsperfdata_* files leaved by unclean Java processes | |
# shutdowns and remove them. | |
# This should be executed by a user without sufficient rights to delete | |
# other users files... | |
for hsperfdata in /tmp/hsperfdata_*/*; do | |
ps -p `basename ${hsperfdata}` &> /dev/null || rm -vf $hsperfdata | |
done |
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
@echo off | |
REM This one-liner does the same as http://sourceforge.net/projects/tikione | |
for /R "C:\Program Files (x86)\Steam\steamapps" %%I in ("") do if exist "%%~dpIredist" rmdir /s /q "%%~dpIredist" |
NewerOlder