Skip to content

Instantly share code, notes, and snippets.

quick build

cargo build

full build

@findepi
findepi / 01_README.md
Last active February 12, 2025 15:43
Allocation elimination, loops and benchmark results

quick build

./gradlew build -x test -x integrationTest -x spotlessJavaCheck -x checkstyleTest

full build, like mvn install

By default only modules for one Spark/Flink/Scala versions are built. To get the full build, component versions need to be enumerated.

  1. Intellij Preferences > Live Templates > group Java
  2. Add a new one with
    • abbreviation rnn
    • Description requireNonNull
    • Template text java.util.Objects.requireNonNull($var$, "$var$ is null")
    • Applicable contexts: Java > Expression
    • check use static imports if possible
  • Edit variables button and there add var variable with variableOfType("Object") expression
@findepi
findepi / rerun-pr-checks.sh
Last active June 25, 2024 16:54
Tirelessly rerun all the failed checks in all open PRs
#bash
set -euo pipefail
sleep_before_reruns_seconds=$[10 * 60]
while true; do
slept=false
for pr_link in $(gh pr list --search 'author:@me' --limit 999 --json 'url' --jq '.[].url'); do
echo "checking PR ${pr_link}"
  1. Intellij Preferences > Live Templates > group Java
  2. Add a new one with
    • abbreviation log
    • Description Add airlift Logger
    • Template text private static final io.airlift.log.Logger log = io.airlift.log.Logger.get($CLASS_NAME$.class);
    • Applicable contexts: Java > Declaration
    • check Shorten FQ names
  • Edit variables button and there add CLASS_NAME variable with className() expression
@findepi
findepi / Dockerfile
Last active March 14, 2024 10:04
Retrieved GitHub secrets securely
# store as docky/Dockerfile to match references in the other script
FROM ubuntu:latest
RUN true && \
export DEBIAN_FRONTEND=noninteractive && \
apt-get update && \
apt-get install -y openssl && \
apt-get clean && \
echo OK
@findepi
findepi / librus-plan-lekcji-przygotuj-do-wydruku.js
Last active August 31, 2023 15:49
Przygotuj Librusowy plan lekcji do wydruku na prawdę do wydruku
/*
* Class timetable as rendered in the Librus Synergia system https://synergia.librus.pl/
*/
(function($) {
// przerwy
$('.plan-lekcji tr.line0').remove()
// sobota, niedziela oraz nr lekcji z prawej strony
@findepi
findepi / maven-release.md
Last active January 4, 2023 14:06
Standard maven release process
mvn clean release:clean && mvn release:prepare
# `env GPG_TTY=$(tty)` may help with some sort of GPG problems
mvn release:perform