This handy piece of code colors errors and warnings in make output.
(put it in your .bash_profile)

make()
{
  pathpat="(/[^/]*)+:[0-9]+???
  ccred=$(echo -e ???\033[0;31m")
  ccyellow=$(echo -e "\033[0;33m")
  ccend=$(echo -e "\033[0m")
  /usr/bin/make "$@" 2>&1 | sed -E -e "/[Ee]rror[: ]/ s%$pathpat%$ccred&$ccend%g??? -e ???/[Ww]arning[: ]/ s%$pathpat%$ccyellow&$ccend%g???
  return ${PIPESTATUS[0]}
}

via shawnwilsher.com

An alternative would be to install colormake and use that instead of the normal make command.

If you need to direct output into the void in your program on a *NIX system you simply pipe or redirect it to the null device /dev/null.
Needing a similar functionality today in a C# .NET project I found the following equivalent:

Stream.Null

Seemed fairly useful to me 😉

Today I did a little bit of XSLT coding and stumbled over the problem to convert ISO 8601 date strings into a more human readable format.

Specifically I wanted to turn a date of the form 2008-04-10T16:12:27Z to the typical german format of 10.04.2008 16:12:27 and spit the whole thing out as HTML to display it on a webpage.
After a bit of time I came up with the following XSLT (sanitized):



	
	
		
		
			
				
				
			
			dtstart
			
				
			
		
		
	
	
	
	
			
	
	
			
	  
	
			
	
	
			
	
	
			
	
	
			
	
	
			
	
		
		
		
		
		
		
		
		
		
		
		
	

Using this example and the mighty power of substring() it should be pretty easy to convert any date format into an other one.