Skip to content

Instantly share code, notes, and snippets.

View PiotrNowicki's full-sized avatar

Piotr Nowicki PiotrNowicki

View GitHub Profile
anonymous
anonymous / gist:4001868
Created November 2, 2012 15:02
Getting GlobalConfigurationBuilder based on existing infinispan.xml
ParserRegistry parserRegistry = new ParserRegistry(Thread.currentThread().getContextClassLoader());
ConfigurationBuilderHolder cbh = parserRegistry.parse(new FileInputStream("ispn.xml"));
GlobalConfigurationBuilder gcb = cbh.getGlobalConfigurationBuilder();
gcb.transport()...
@bartoszmajsak
bartoszmajsak / prepare-commit-msg.sh
Last active March 20, 2024 08:12
How to automatically prepend git commit with a branch name
#!/bin/bash
# This way you can customize which branches should be skipped when
# prepending commit message.
if [ -z "$BRANCHES_TO_SKIP" ]; then
BRANCHES_TO_SKIP=(master develop test)
fi
BRANCH_NAME=$(git symbolic-ref --short HEAD)
BRANCH_NAME="${BRANCH_NAME##*/}"
@katta
katta / mvncolor.sh
Created June 15, 2011 18:50
Script to add colors to maven output
#!/usr/bin/env bash
# Formatting constants
export BOLD=`tput bold`
export UNDERLINE_ON=`tput smul`
export UNDERLINE_OFF=`tput rmul`
export TEXT_BLACK=`tput setaf 0`
export TEXT_RED=`tput setaf 1`
export TEXT_GREEN=`tput setaf 2`
export TEXT_YELLOW=`tput setaf 3`