Skip to content

Instantly share code, notes, and snippets.

View TheBigAleski's full-sized avatar
🐻
hibernating on 🍻

Alex LEGROS TheBigAleski

🐻
hibernating on 🍻
  • Sogeti
  • Rennes, FRANCE
View GitHub Profile
@jdanbrown
jdanbrown / log-color
Created November 21, 2011 04:51
log4j logs in color!
#!/bin/bash -eu
#
# Color log4j-style logs for easier visual parsing.
#
# Usage:
# tail foo.log | log-color
# run-service | log-color
black="` tput setaf 0; tput bold`"
red="` tput setaf 1; tput bold`"
@halyph
halyph / App.java
Created June 27, 2012 16:07
Read META-INF/MANIFEST.MF from jar file #java #manifest #read
Manifest mf = new Manifest();
mf.read(Thread.currentThread().getContextClassLoader().getResourceAsStream("META-INF/MANIFEST.MF"));
Attributes atts = mf.getMainAttributes();
System.out.println("Version: " + atts.getValue("Implementation-Version"));
System.out.println("Build: " + atts.getValue("Implementation-Build"));