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 | |
set -e | |
if [ -d ~/.local/share/JetBrains/Toolbox ]; then | |
echo "JetBrains Toolbox is already installed!" | |
exit 0 | |
fi | |
echo "Start installation..." |
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
/* | |
Credits: | |
https://productforums.google.com/forum/#!topic/docs/w4MXeqJaefU | |
http://webapps.stackexchange.com/questions/23861/header-numbering-in-google-docs | |
Instructions to use: | |
In a Google Doc |
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 org.hamcrest.Description; | |
import org.hamcrest.TypeSafeMatcher; | |
import java.time.OffsetDateTime; | |
import java.time.format.DateTimeParseException; | |
import static java.time.format.DateTimeFormatter.ISO_OFFSET_DATE_TIME; | |
/** | |
* Matcher to validate date-time strings. Can also be used as equals matcher for offset date-time. |
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 https://nipafx.dev/junit-5-architecture-jupiter#api-lifecycle | |
Internal: Must not be used by any external code. Might be removed without prior notice. | |
Deprecated: Should no longer be used, might disappear in the next minor release. | |
Experimental: Intended for new, experimental features where the publisher of the API is looking for feedback. Use with caution. Might be promoted to Maintained or Stable in the future, but might also be removed without prior notice. | |
Maintained: Intended for features that will not be changed in a backwards-incompatible way for at least the next minor release of the current major version. If scheduled for removal, such a feature will be demoted to Deprecated first. | |
Stable: Intended for features that will not be changed in a backwards-incompatible way in the current major version. | |
Java | |
https://github.com/apiguardian-team/apiguardian |
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
CA | |
openssl genrsa -aes256 -out rootCA.key 4096 | |
openssl req -x509 -new -nodes -key rootCA.key -sha256 -days 3650 -out rootCA.crt | |
truststore.jks | |
keytool -keystore truststore.jks -alias rootca -import -file rootCA.crt | |
openssl signing | |
openssl genrsa -aes256 -out server.key 2048 | |
openssl req -new -key server.key -out server.csr |
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
git filter-branch -f --env-filter "GIT_AUTHOR_NAME='To Name'; GIT_AUTHOR_EMAIL='to@email.com'; GIT_COMMITTER_NAME='To Name'; GIT_COMMITTER_EMAIL='to@email.com';" HEAD; |
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
infix fun Double.roundToSig(places: Int): Double { | |
val order = log10(this).roundToInt() + 1 | |
val shift = 10.0.pow(places - order) | |
return round(this * shift) / shift | |
} | |
fun testRoundToSig() { | |
assert(12.9.roundToSig(2).toString() == "13.0") |
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 | |
# Close container on SIGTERM | |
# It's a bit hacky but here is the thing | |
onSIGTERM(){ | |
# Now pass SIGTERM to application | |
kill -15 $applicationPid | |
# And wait for it to gracefully close | |
wait $applicationPid | |
# Now we can close this script and also the running container since this script would be run with PID 1 |
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
if(!doc['tags.keyword'].empty && doc['tags.keyword'].contains("parallel_gc")) { | |
return doc['duration'].value * 1000 | |
} |
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 to_camel_case: . | ascii_downcase | split("_") | .[0:1] as $first | .[1:] | map(.[1:] as $rest | .[0:1] | ascii_upcase | . + $rest) | $first + . | join(""); |
NewerOlder