View xml files like a pro

Viewing XML files can be daunting with tracking mentally where the tag starts and where it ends. So, I ended up with the following alias to help me view xml files

xmllint --format - | pygmentize -f 16m -O style=native -g

procinfo and procinfo-ng : Get system information from /proc.

The Fedora Project logo
The Fedora Project logo (Photo credit: Wikipedia)

Install procinfo or procinfo-ng. The procinfo contains three programs :

/usr/bin/lsdev
/usr/bin/procinfo
/usr/bin/socklist

and procinfo-ng contains ::

/usr/bin/procinfo-ng

The description for both of them is similar ::

Name        : procinfo-ng
Version     : 2.0.304
Release     : 5.fc17
Architecture: i686
Install Date: Tue 24 Jul 2012 05:45:10 PM IST
Group       : Applications/System
Size        : 140366
License     : GPLv2 and LGPLv2
Signature   : RSA/SHA256, Mon 12 Mar 2012 09:56:55 PM IST, Key ID 50e94c991aca3465
Source RPM  : procinfo-ng-2.0.304-5.fc17.src.rpm
Build Date  : Wed 29 Feb 2012 02:30:54 AM IST
Build Host  : x86-06.phx2.fedoraproject.org
Relocations : (not relocatable)
Packager    : Fedora Project
Vendor      : Fedora Project
URL         : http://sourceforge.net/projects/procinfo-ng/
Summary     : Console-based system monitoring utility
Description :
Procinfo-NG is a complete rewrite of the old system monitoring application
procinfo.  The goal is to make more readable (and reusable) code and to
restore broken functionality.

So, just install these with ::

sudo yum install procinfo procinfo-ng
Enhanced by Zemanta

colorgcc – Color your compiler output on Fedora

Lets start with installing colorgcc :

sudo yum install colorgcc

Now once that is done, you will need to ensure that the call to g++, gcc and others that you want to use, you will need to create a link in the “~/bin” directory, like so:

for i in g++ gcc c++ cc 
do
    ln -s $(which colorgcc) ~/bin/$i
done

The one liner above will create the links for colorgcc as your favourite compiler in your homedir. Don’t forget to add the bin diretory to your PATH variable:

export PATH=~/bin:$PATH

And now finally the ~/.colorgccrc file taken from Ubuntu for your reference:

#
# colorgcc configuration file
#
# $Id: colorgccrc,v 1.1.1.1 1999/04/25 15:24:03 jamoyers Exp $
#
# This file should be named $HOME/.colorgccrc
#
#
# The following groups of attributes may be combined for a given color:
#
# clear         black      on_black
# reset            red        on_red
# bold            green      on_green
# underline     yellow     on_yellow
# underscore    blue       on_blue
# blink            magenta    on_magenta
# reverse       cyan       on_cyan
# concealed     white      on_white
#
# For example, srcColor: bold cyan on_yellow
#

# gccVersion: if defined, append "-" to the compiler paths
# defined hereunder. Otherwise, those paths remains as is set
# gccVersion: 4.1.1

# Define the paths to the actual location of the various compilers.
# (Currently, colorgcc only understands these: g++ gcc c++ cc g77 f77 gcj)
g++: /usr/bin/g++
gcc: /usr/bin/gcc
c++: /usr/bin/g++
cc:  /usr/bin/gcc
#g77: /usr/bin/g77
#f77: /usr/bin/g77
#gcj: /usr/bin/gcj

# Don't do color if our terminal type ($TERM) is one of these.
# (List all terminal types on one line, seperated by whitespace.)
nocolor: dumb emacs

# Text between ` and ' is usually source code.
srcColor: bold cyan

# Text other than a warning or error.
introColor: reset

# Warnings and errors both have similar formats:
#    filename:999:Message
# Each field may be assigned a different color.

# Warnings
warningFileNameColor: reset
warningNumberColor:   blue
warningMessageColor:  yellow

# Errors
errorFileNameColor: reset
errorNumberColor:   blue
errorMessageColor:  bold red

# Possible translations, if you use localized compiler.
# (List all translations on one line, seperated by whitespace.)
warningTranslations:
errorTranslations:
Enhanced by Zemanta