Skip to content

Instantly share code, notes, and snippets.

@jasper-vandemalle
jasper-vandemalle / mvn-colorize.plugin.zsh
Last active August 21, 2019 13:08 — forked from rwoeber/maven.plugin.zsh
oh-my-zsh Plugin to colorize Maven. Put in `${OH_MY_ZSH_HOME}/custom/plugins/maven` and add to plugins array in `.zshrc`
# Original from https://gist.github.com/evelyne24/7714094
# Notes
# In MacOS, + does not work for regex, nor -E flag.
# Instead I used \{1,\} for char repetition.
# Formatting constants
bold=`tput bold`
red=`tput setaf 1`
bg_red=`tput setab 1`
green=`tput setaf 2`
@jasper-vandemalle
jasper-vandemalle / FieldUtils.java
Created April 25, 2014 06:03
FieldUtils mutates and accesses fields using reflection.
package be.vandemalle.jasper.util.reflection;
import java.lang.reflect.Field;
import org.apache.commons.lang.StringUtils;
public class FieldUtils {
/**
* Get the specified field on the class. If the field is not found on the class itself will recursively check
* the superclass.