Skip to content

Instantly share code, notes, and snippets.

View mballoni's full-sized avatar
🎯
Focusing

Marcelo Balloni mballoni

🎯
Focusing
View GitHub Profile
@mballoni
mballoni / regex_group_name
Created July 17, 2018 21:29
Regex groups naming convention
let day ='(?<day>\\d+ *)', month='(?<month> *\\d+)', regexp = new RegExp(`^${day}\/${month}$`, 'g')
https://www.digitalocean.com/community/tutorials/how-to-set-up-password-authentication-with-nginx-on-ubuntu-14-04
https://medium.com/adorsys/jvm-memory-settings-in-a-container-environment-64b0840e1d9e
https://bugs.java.com/bugdatabase/view_bug.do?bug_id=JDK-8186248
<?xml version="1.0" encoding="UTF-8"?>
<Configuration>
<Appenders>
<Console name="Console" target="SYSTEM_OUT">
<PatternLayout alwaysWriteExceptions="false" pattern="{'time':'%d{ISO8601}','trace':'%X{traceId}','thread':'[%t]','level':'%-5level','logger':'%logger{1.}','java':'$${java:version}','message':'%replace{%msg%maxLen{%rEx{full}}{1600}}{\r?\n}{↵}'}%n"/>
</Console>
</Appenders>
<Loggers>
<Root level="info">
docker run -p 8983:8983 --cpus=2 -v "$PWD/solr.in.sh:/opt/solr/bin/solr.in.sh" -m=1G solr:7.7.2-slim
SOLR_JAVA_MEM="-XX:+UseContainerSupport -XX:MaxRAMPercentage=90 -XX:MinRAMPercentage=90"
GC_TUNE="-XX:+UseG1GC -XX:MaxGCPauseMillis=250 -XX:+ParallelRefProcEnabled"
https://docs.hortonworks.com/HDPDocuments/Ambari-2.7.3.0/using-ambari-core-services/content/amb_tuning_gc_settings_for_solr.html
https://dzone.com/articles/apache-solr-memory-tuning-for-production
@mballoni
mballoni / Dockerfile
Created February 14, 2020 03:17
Jlink experimentations with Spring Boot an minimal image
FROM openjdk:11-slim-buster AS builder
WORKDIR /workspace/app
COPY abc.jar demo.jar
RUN jar -xf demo.jar
RUN mkdir custom
RUN jlink --no-header-files --no-man-pages --compress=2 --strip-debug --add-modules java.base,java.logging,java.naming,java.desktop,java.management,java.security.jgss,java.instrument,java.sql --output custom/jre
@mballoni
mballoni / gist:c987f2fe3c6cd8bf4dcf995e8a60ea4b
Created November 17, 2020 19:46
git config email and username by directory
cd ~
cat .gitconfig
[user]
email = [email protected]
name = personal name
[includeIf "gitdir:~/repositories/someclient/"]
path = ~/repositories/someclient/.gitconfig
cd ~/repositories/someclient
@[YOUR COMPANY]:registry=https://gitlab.com/api/v4/packages/npm/
//gitlab.com/api/v4/packages/npm/:_authToken=[GITLAB_TOKEN]
//gitlab.com/api/v4/projects/:_authToken=[GITLAB_TOKEN]
//registry.npmjs.org/:_authToken=[NPMJS_TOKEN]