Skip to content

Instantly share code, notes, and snippets.

View rotty3000's full-sized avatar

Raymond Augé rotty3000

View GitHub Profile
@rotty3000
rotty3000 / expected-output.log
Created April 8, 2025 15:59
Client Extension ENV contract in Go
LIFERAY_ROUTES_DXP Configuration:
Domains: [localhost]
Main Domain: localhost
Server Protocol: http
LIFERAY_ROUTES_CLIENT_EXTENSION Configuration for 'liferay-sample-etc-spring-boot-oauth-application-user-agent':
Headless Server Audience:
Headless Server Client ID:
Headless Server Client Secret:
Headless Server Scopes:
Authorization URI: /o/oauth2/authorize
@rotty3000
rotty3000 / expected-output.log
Last active April 8, 2025 15:47
Client Extension ENV contract in Python
DXP Domains:
- localhost
DXP Main Domain: localhost
DXP Server Protocol: http
OAuth 2.0 Configuration for 'liferay-sample-etc-spring-boot-oauth-application-user-agent':
headless_server_audience: None
headless_server_client_id: None
@rotty3000
rotty3000 / Dockerfile
Created September 26, 2022 13:45
Add Azul Zulu Debian repo without warnings and using `signed-by` pattern.
RUN mkdir -p /etc/apt/keyrings && \
curl -fsSL 'https://keyserver.ubuntu.com/pks/lookup?op=get&search=0xB1998361219BD9C9' | gpg --dearmor -o /etc/apt/keyrings/azul.gpg && \
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/azul.gpg] https://repos.azul.com/zulu/deb stable main" \
| tee /etc/apt/sources.list.d/zulu-openjdk.list > /dev/null && \
apt-get update && \
apt-get install -y zulu11-jdk && \
apt-get clean
@rotty3000
rotty3000 / validate-custom-element.sh
Last active March 11, 2022 19:25
Validate Web Component Custom Element name with bash and grep
#!/bin/bash
# Derived from https://html.spec.whatwg.org/multipage/custom-elements.html#valid-custom-element-name
PCENCHAR=[-.0-9_a-z\\xB7\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\x{037D}\\x{037F}-\\x{1FFF}\\x{200C}-\\x{200D}\\x{203F}-\\x{2040}\\x{2070}-\\x{218F}\\x{2C00}-\\x{2F2F}\\x{3001}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFFD}\\x{10000}-\\x{EFFFF}]
CUSTOM_ELEMENT_NAME_REGEX=^[a-z]${PCENCHAR}*-${PCENCHAR}*$
if ! (echo "$1" | grep -q -P $CUSTOM_ELEMENT_NAME_REGEX); then
echo "invalid custom element name '$1'"
fi
@rotty3000
rotty3000 / example.java
Last active December 18, 2021 16:08
jdeps as ToolProvider exception on reuse
/*
The jdeps args used can be:
*/
jdeps0(
"--ignore-missing-deps",
"--no-recursive",
"--print-module-deps",
"--multi-release",
System.getProperty("java.specification.version"),
file.getAbsolutePath());
@rotty3000
rotty3000 / script.java
Created December 11, 2021 21:04
JShell Script SEBANG line
//usr/bin/env jshell <(for V in "$@";do A+="\"$V\",";done;echo "String[] args = {$A}") "$0"; exit $?
Stream.of(
args
).map(
"ARG: "::concat
).forEach(
System.out::println
);
@rotty3000
rotty3000 / command.bash
Last active November 22, 2021 16:57
jaxb-api jdeps
jdeps -verbose:class --multi-release 17 \
--module-path ~/.m2/repository/javax/activation/javax.activation-api/1.2.0/javax.activation-api-1.2.0.jar \
~/.m2/repository/javax/xml/bind/jaxb-api/2.4.0-b180830.0359/jaxb-api-2.4.0-b180830.0359.jar
@rotty3000
rotty3000 / gist:a68c8ea494f4c1b2e304822dc8a72a66
Created October 1, 2018 13:59
diff asm 7.0-BETA vs. 6.2.1
~]$ baseline -v ~/.m2/repository/org/ow2/asm/asm/7.0-beta/asm-7.0-beta.jar ~/.m2/repository/org/ow2/asm/asm/6.2.1/asm-6.2.1.jar
===============================================================
org.objectweb.asm 7.0.0.beta-6.2.1
===============================================================
Package Delta New Old Suggest If Prov.
org.objectweb.asm MAJOR 7.0.0.beta 6.2.1 ok -
MAJ class org.objectweb.asm.ClassVisitor
+ method visitNestHost(java.lang.String)
+ return void
- method visitNestHostExperimental(java.lang.String)
@rotty3000
rotty3000 / build.gradle
Created April 24, 2017 19:27
gradle flatten while copy
/*
Where:
origin/
├── foo
│   └── fum.txt
├── bar
│   └── other.txt
└── biz
   └── baf
   └── bop
@rotty3000
rotty3000 / vcs-repository-litmus-test.md
Last active September 16, 2017 03:58
Litmus Test for VCS Repository Separation

Litmus Test for VCS Repository Separation

How do you or should you break a monolithic repository into smaller pieces?

The question of whether separation should take place and how granular it should be is a debate that happens in very significantly large project I've been involved with to date.

If the goal is to make developers lives easier, then the split must certainly not cause more harm than good. There can't be a hard and fast rule such as "each module should have it's own repository" because the day to day impact of a project maintained by a single individual could be horrendous if the project contains hundreds of modules. On the other hand, a project with thoudsands of developers and thoudsands of modules likely will struggle equaly with such a rule.

Therefore I'm working on a initial litmus test to determine the criteria for breaking a large repository into several smaller repositories.