Skip to content

Instantly share code, notes, and snippets.

View lprimak's full-sized avatar

Lenny Primak lprimak

View GitHub Profile
@lprimak
lprimak / eclipse.transformer
Created January 16, 2023 04:15
How to invoke Eclipse Transformer
jbang org.eclipse.transformer:org.eclipse.transformer.cli:LATEST
@lprimak
lprimak / update-copyright.sh
Last active January 1, 2025 15:35
Update copyright license year
@lprimak
lprimak / cicd_best_practices
Created November 26, 2022 05:14
CI/CD best practices article
https://www.cloudbees.com/blog/apache-maven-continuous-deliverydeployment-devoptics-teams-approach
@lprimak
lprimak / upgrade_postgres
Last active October 22, 2025 01:55
How to upgrade postgres
Assume the new version is 18, old is 17
* If new postgres is not available in code, make sure Tap petere/postgresql exsists
* Do not uninstall the old database version until the end
(admin) brew install postgresql@18
new_major=18
new_minor=0
old_major=17
old_minor=6
@lprimak
lprimak / fix_wireshark
Created September 30, 2022 03:36
Fix Wireshark
sudo dseditgroup -o edit -a lprimak -t user access_bpf
@lprimak
lprimak / shiro-key
Created September 30, 2022 00:47
How to create Shiro cipher key
openssl enc -aes-128-cbc -k secret -P -md sha256
@lprimak
lprimak / private-mh
Created September 19, 2022 01:43
calling private methods w/MethodHandles
var lookup = MethodHandles.privateLookupIn(EagerBeansWebListener.class, MethodHandles.lookup());
var mh = lookup.findStatic(EagerBeansWebListener.class, "disable", MethodType.methodType(void.class));
mh.invokeExact();
@lprimak
lprimak / pr-pull
Created January 22, 2021 23:27
How to pull PRs
$ git fetch upstream pull/5081/head
@lprimak
lprimak / SoteriaSecurity
Created September 22, 2020 18:59
Soteria Security Examples
here's a full set of tests/samples here:
https://github.com/eclipse-ee4j/soteria/tree/master/test
Every test is a full web application.
There's a larger application using Jakarta EE security available here: https://github.com/javaeekickoff/java-ee-kickoff-app
Let me know if that works for you.
@lprimak
lprimak / version-and-deploy
Last active August 16, 2025 23:12
How to version, update and deploy things
# Version things
mvn versions:set -DprocessAllModules=true -DgenerateBackupPoms=false -DoldVersion=2.5-SNAPSHOT -DnewVersion=2.6-SNAPSHOT
# Deploy Arquillian Core
mvn release:prepare -DaltReleaseDeploymentRepository=payara-nexus-artifacts::default::https://nexus.payara.fish/repository/payara-artifacts \
-DconnectionUrl=scm:git:git@github.com:flowlogix/arquillian-core.git \
-DautoVersionSubmodules=true -DpushChanges=false -DreleaseVersion=1.7.0.Alpha7.payara-p1
# Deploy Arquillian Drone
mvn release:prepare release:perform -Darguments="-Dbrowser=chromeheadless -DaltDeploymentRepository=hope-nexus-artifacts::https://nexus.hope.nyc.ny.us/repository/maven-releases"