A 100% BusyBox-friendly TUI that shows CPU utilisation and Linux
cgroup throttling in real time. Just awk
, ANSI, and a sprinkle of unicode.
cpugraph --as-cpu-cores --pid 1 --throttling-graph
#!/bin/bash | |
set -e | |
if [ -d ~/.local/share/JetBrains/Toolbox ]; then | |
echo "JetBrains Toolbox is already installed!" | |
exit 0 | |
fi | |
echo "Start installation..." |
/* | |
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 |
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. |
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 |
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 |
git filter-branch -f --env-filter "GIT_AUTHOR_NAME='To Name'; GIT_AUTHOR_EMAIL='[email protected]'; GIT_COMMITTER_NAME='To Name'; GIT_COMMITTER_EMAIL='[email protected]';" HEAD; |
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") |
#!/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 |
if(!doc['tags.keyword'].empty && doc['tags.keyword'].contains("parallel_gc")) { | |
return doc['duration'].value * 1000 | |
} |