Dec
04
2008
0

Colorful make output

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.

Written by Florian Beer in: development, linux, mac
rel-tag , , , , , , , ,

Jul
10
2008
1

Metalab Vienna promo video


Metalab Promo from kewagi on Vimeo.

I’ve been following this project from it’s start.
I guess it’s time that I pay them a visit and see for myself what’s happening there, seems to be a really creatively sparking community.

Written by Florian Beer in: development, linux, mac, private, web
rel-tag , ,

Apr
29
2008
0

Linuxwochen Eisenstadt 2008

On Mai the 30th & 31st the Austrian “Linuxwochen” will again hit my former university in Eisenstadt.
Look ahead for some very interesting talks by several highly skilled people.

One event I’d especially like to draw your attention to is Oliver’s pice about “Linux Server Experience with VServer” on Fr. the 30th. at 17:15 hours.

I’d be happy (and I’m sure, Olli even more) to see a lot of people attending this great event, listening to the talks held there and discuss open source solutions with us :)

Oct
03
2007
1

Ubuntu countdown


Written by Florian Beer in: linux
rel-tag , ,

May
30
2007
1

Log4Twitter

Log4Twitter is very similar to an idea Herbert an me had a couple of years ago, to use a Jabber messaging framework to get distributed logging and alerts from several servers/applications.
It is a Java class that allows you to “log” to Twitter. This would easily allow you to set up an application that sends messages to a private Twitter Account that you can subscribe to. Retrieving those messages should then be possible by IM or even SMS, seems like a perfect set up for me.

Using Log4Twitter is as easy as the following:

Setting Classpath
Add log4twitter-1.0.jar to your application’s classpath.
Note that log4twitter-1.0.jar has to be loaded by the same classloader that will load the logging framework.

Setting Logger
Edit your logging framework’s configuration to enable Log4Twitter.
The fully qualified class name of log4twitter is “log4twitter.FRAMEWORK_NAME.TwitterAppender”.

See the Log4Twitter page for some examples.

Now who’s got the time to code a Linux syslogd replacement or supplement, so I can receive important log messages via Twitter? :)

Mar
27
2007
4

Colorful grep

grep is a useful little *nix command line utility that makes it easy to search for strings in files. The real beauty comes when you start using it with pipes. One thing that kind of bothered me since I started using it, that it didn’t highlight the string you where searching for in it’s output.
Turns out, this can be accomplished very easily (should really just have reade the man page ;) ).

Put the following in your shell startup script (/home/flo/.bashrc in my case)
export GREP_OPTIONS='--color=auto'
Now that was simple wasn’t it (though you’ll have to re-log in to make it work or at least spawn another shell process, so the startup file gets sourced) :)

But now if you followed my tip and started using pipes like mad, after applying this tip, you’ll quickly encounter that the colors are gone again. To hand over colors to say the often used less program you have to make an alias that hands grep the –color=always option (don’t put this in GREP_OPTIONS it tends to break things!) and call less with the -R option.
Or simpler, just add the following to your shell startup script:
export LESS=-R
alias cgrep='grep --color=always'

Written by Florian Beer in: linux
rel-tag , , , , , ,