Skip to content

Instantly share code, notes, and snippets.

View agustisanchez's full-sized avatar

Agustí Sánchez agustisanchez

View GitHub Profile
@joseluisq
joseluisq / terminal-git-branch-name.md
Last active August 19, 2026 12:30
Add Git Branch Name to Terminal Prompt (Linux/Mac)

Add Git Branch Name to Terminal Prompt (Linux/Mac)

image

Open ~/.bash_profile in your favorite editor and add the following content to the bottom.

# Git branch in prompt.

parse_git_branch() {
@msosvi
msosvi / Slf4jSessionLogger.java
Created October 30, 2011 10:25
This is a wrapper class for SLF4J. It is used when EclipseLink messages need to be logged through SLF4J.
package org.eclipse.persistence.logging;
import java.util.HashMap;
import java.util.Map;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.util.StringUtils;
/**