The Archives

  • 12.Oct.12
    Make colored output shell | fernape | (0)
    I found a nice script in stackoverflow about how to color the output of make in bash. It works by filtering the output and looking for certain expressions to highlight. Placing this function definition in your .bashrc file defines a bash make function which gets executed instead of the command. This way we can shadow the real make command and create our own custom version. make() { ccred=$(echo -e "33[1;31m") ccyellow=$(echo -e "33[1;33m") ccend=$(echo -e "33[0m") /usr/bin/make "$@" 2>&1 | sed -e "s/[Ee]rror:/$ccred&$ccend/g" -e "s/[Ww]arning:/$ccyellow&$ccend/g" return ${PIPESTATUS[0]} } Of course, you can use this ...
  • 07.Jan.10
    Vim for programmers (II) shell | fernape | (2)
    In the first part of this series, we visited some Vim features that help us in programming. In this second issue, I will show you some other important things you should know to really appreciate the power of Vim. Completion Completion is not a programming specific feature in Vim, however it is in programming where I find it to be more useful. There are several completion options, but I will explain the ones I find more interesting. Completion is a sub mode of insert mode. This means the commands are applied while being in insert mode. Line completion: Ctrl-x ...
  • 31.Dec.09
    Make Love cmd | fernape | (0)
    In FreeBSD: $ cd /usr/src $ make love Enjoy the output. Merry Christmas! Source: psybermonkey
  • 29.Jun.09
    Measuring network performance network | fernape | (0)
    FreeBSD includes several benchmarking suites in the ports collection. One of these suites is netperf, developed by HP. It allows measuring several network parameters using two programs: the server and the client. First things first: let us install netperf. % cd /usr/ports/benchmarks/netperf && make install clean Once the software has been successfully compiled (it does not take long) we can bring the server up: $ netserver Starting netserver at port 12865 Starting netserver at hostname port 12865 and family AF_UNSPEC Notice that you can launch the server as a regular user. Now, we are ready to run our test: $ netperf -t TCP_STREAM TCP STREAM TEST from ...