Skip to content

Instantly share code, notes, and snippets.

@jdluna
jdluna / MultipleSSHGitAccounts.md
Created July 18, 2025 16:11 — forked from juandm/MultipleSSHGitAccounts.md
Set up multiple git accounts (Gitlab, Github, Bitbucket) with SSH in the same machine

Multiple GIT accounts setup

This short tutorial shows how to set up multiple different accounts of many git repository sites using SSH, all this tutorial and its commands were aplied in Ubuntu.

Generate SSH keys

Generate SSH keys for each one of the sites you wanna connect:

  1. Open your terminal and type the following command to generate a RSA key:

ssh-keygen -o -t rsa -b 4096 -C "email@example.com"

@jdluna
jdluna / nvmCommands.js
Created July 13, 2025 05:06 — forked from chranderson/nvmCommands.js
Useful NVM commands
// check version
node -v || node --version
// list locally installed versions of node
nvm ls
// list remove available versions of node
nvm ls-remote
// install specific version of node
@jdluna
jdluna / Docker-multistage-example.MD
Created November 3, 2023 14:52 — forked from liemle3893/Docker-multistage-example.MD
Docker Multistage + Spring Boot = Smaller Container Sized

docker-multi-stage

Spring Boot + Docker Multistage = Smaller container size

Use can use prebuild version by using:

$ docker run -d -p 8080:8080 saboteurkid/smaller-spring:1.0

Wait for docker to pull and up. Then jump to step #6

1. Clone example project from Spring Boot repository

@jdluna
jdluna / gitlab_access_token.md
Created July 20, 2023 04:31 — forked from michaellihs/gitlab_access_token.md
Create Gitlab Personal Access Token using curl

Create Gitlab Personal Access Token using curl

Prerequisites

  • You need a Gitlab server up and running
  • You need user credentials for a (admin) user on the Gitlab server
  • You need curl and Perl on your server
#!/bin/bash
echo "########### Setting region as env variable ##########"
export AWS_REGION=sa-east-1
echo "########### Setting up localstack profile ###########"
aws configure set aws_access_key_id access_key --profile=localstack
aws configure set aws_secret_access_key secret_key --profile=localstack
aws configure set region $AWS_REGION --profile=localstack
echo "########### Setting default profile ###########"
@jdluna
jdluna / spring-boot-docker.md
Created November 3, 2022 09:29 — forked from msauza/spring-boot-docker.md
Multi-Layer, Multi-Stage: Spring Boot application with Docker.

Overview

Spring Boot applications can run within a container by Multi-Layer based approach. Each layer may contain different parts of the application such as dependencies, source code, resources and even snapshot dependencies.

In the other hand, with Multi-Stage Build approach, any application can be built at a separate image from the final image that will contain the runnable application.

Spring Boot Docker

Multi-Layer

@jdluna
jdluna / spring-boot-docker.md
Created November 3, 2022 09:29 — forked from msauza/spring-boot-docker.md
Multi-Layer, Multi-Stage: Spring Boot application with Docker.

Overview

Spring Boot applications can run within a container by Multi-Layer based approach. Each layer may contain different parts of the application such as dependencies, source code, resources and even snapshot dependencies.

In the other hand, with Multi-Stage Build approach, any application can be built at a separate image from the final image that will contain the runnable application.

Spring Boot Docker

Multi-Layer

@jdluna
jdluna / gist:6c6b0d858a54551f6949c7fdf879bb7e
Created April 4, 2022 03:58 — forked from mojaie/gist:6339057
Sample of Py4J Python script
import atexit
import platform
import subprocess
import time
from py4j.java_gateway import JavaGateway
class JavaConnection(object):
JAR_PATH = "./jar/testentrypoint.jar"
@jdluna
jdluna / StringUtils.java
Created March 23, 2022 14:04 — forked from rponte/StringUtils.java
Removing accents and special characters in Java: StringUtils.java and StringUtilsTest.java
package br.com.triadworks.rponte.util;
import java.text.Normalizer;
public class StringUtils {
/**
* Remove toda a acentuação da string substituindo por caracteres simples sem acento.
*/
public static String unaccent(String src) {