Archive for the ‘Life the Universe and Everything’ Category

Gentoo eix

By Mark Davidson on April 19th, 2010

eix is a tool that allows for fast and highly flexible searching of the gentoo portage system. There is a guide of how to get it installed and basic usage instructions on the Gentoo Wiki.

In this post I would just like to point out the two most useful commands I have found while using eix.


First of all the format argument is one of the most powerful features of eix. I have found it to be very useful when using the available versions parameter. Which allows you to see all the available versions of a particular program, available on the portage tree.

Here is an example of using it to find all the avaliable versions of nmap within the portage tree

eix --format '<availableversions:NAMEVERSION>' -e nmap

Which will give you an output like

net-analyzer/nmap-4.76
net-analyzer/nmap-4.85_beta9
net-analyzer/nmap-4.90_rc1
net-analyzer/nmap-5.00
net-analyzer/nmap-5.00-r2
net-analyzer/nmap-5.10_beta1
net-analyzer/nmap-5.20
net-analyzer/nmap-5.21

Then if you wanted to install say version 5.20 of nmap you can just do

emerge =net-analyzer/nmap-5.20

Another really useful command is multi installed which as is implied allows you to find all packages that have multiple versions installed.

The command with it arguments for this is

eix -i

Since the output from this is quite big on my system I will give a different command and its output for example. This command does the same as mentioned above but is limited by category of ‘dev-lang’ and also used verbose output to make it a bit clearer.

The resulting command is

eix -C dev-lang -v -i

Which reveals that I have quite a few versions of python installed


Those are the quick two commands I wanted to point out for now. I highly recommend checking out eix as it makes a really good alternative to qsearch. When using eix checking out the manual is an absolute must as its over 50 pages long and gives you a true idea of the ammount of functionality avaliable.

Interesting Ubuntu Terminal Keyboard Shortcut

By Mark Davidson on April 7th, 2010

A really quick post this one as I can’t find any documentation on it but thought it was fairly cool. If you use the “SHIFT + ALT + {” keyboard shortcut combo it does autocomplete to match all the files / folders in a directory or some of the files / folders if you have already started typing. Not sure if that makes any sense so an example is in order.

So say in your directory you have the following files ( This is my Zend/Validate/ dir incase anyone wonders)

Abstract.php  Alnum.php        Alpha.php         Barcode         Barcode.php
Between.php   Callback.php     Ccnum.php         CreditCard.php  Date.php
Db            Digits.php       EmailAddress.php  Exception.php   File
Float.php     GreaterThan.php  Hex.php           Hostname        Hostname.php
Iban.php      Identical.php    InArray.php       Interface.php   Int.php
Ip.php        Isbn.php         LessThan.php      NotEmpty.php    PostCode.php
Regex.php     Sitemap          StringLength.php

In this directory if you just do

SHIFT + ALT + {

{A{bstract.php,l{num.php,pha.php}},
B{arcode{,.php},etween.php},
C{allback.php,cnum.php,reditCard.php},D{ate.php,b,igits.php},
E{mailAddress.php,xception.php},F{ile,loat.php},
GreaterThan.php,H{ex.php,ostname{,.php}},
I{ban.php,dentical.php,n
{Array.php,t{.php,erface.php}},p.php,sbn.php},
LessThan.php,NotEmpty.php,PostCode.php,
Regex.php,S{itemap,tringLength.php}}

While if you type a “C” then do it you get

C{allback.php,cnum.php,reditCard.php}

I appreciate its not the most amazing thing in the world but can be pretty handy when you need something a tad more custom than a stand * wildcard. If anyone else knows of some cool keyboard shortcuts for Ubuntu I would be interested in hearing them I have not found any other site that documents this one so I would be interested to know if other people have come across any where that does talk about it.

NetBeans 6.9

By Mark Davidson on March 17th, 2010

I am a massive NetBeans fan and since NetBeans 6.9 is in the pipeline I thought I would do a quick post to point out some of the new features that are coming with the new release, which should be out some time in June.

So Whats New

You can check out a full list of whats new in 6.9 on the NetBeans Wiki New & Note Worthy Page. I will just be pointing out in this post a few of the features that paticularly interest me.

Build & Run JDK 6 Only

This has been coming for a long time I hadn’t read any release information when I first downloaded the latested source from mercurial and took me a bit to reliase I neeed to build with JDK 6. This is really good although slightly annoying if your running certain versions of OSX that don’t support Java 6.

Zend Framework Support (PHP)

This is one of the features I am most excited about since I am just starting to develop some web appliations using Zend its great to have my favourite IDE intergrate so well with the framework. As well as the obvious features such as being able to create a Zend Project and Syntax Completion there is also integration with all the Zend Commands that you would normally do with the zf.sh script. For more details check out the NetBeans PHP Blog most on Zend Framework Support.

Improved PHPDoc in Code Completion (PHP)

A minor feature in some respects but I personally think a really good improvment. As I think people should use PHPDoc a lot more and this can only encourage people to use it to full effect.

PHP Code Formatting Improvments (PHP)

Finally it looks like NetBeans code formatting for PHP now has caught up to how customisable it is with Java. I am really pleased about this as it can be paticually annoying on some big projects if you cant easily enforce coding standards.

CSS Refactoring / Find Usages Support & CSS Code Completion

I can’t even begin to explain how pleased I am about this. CSS has always been a bit of a pain paticually when it came to restructuring or making any significant changes. Now with refactoring support its got 100x easier. This combined with CSS code completion I belive makes NetBeans a Web Developers dream.

JDK 7 Support

JDK 7 Support is also being added to this release this is really awesome. There is some really interesting new features in JDK 7 I will probably do an article about them at some point but for now check out the notes on the features that are currently being added to the editor.


Thats all I want to cover for now lots of awesome new features as always with a NetBeans release do check it out. You either want to download Milestone 1 or compile the latest version from source which I wrote a guide on a few weeks ago for doing it under OSX.

Also check out these links for more details

http://wiki.netbeans.org/NetBeans_69
http://wiki.netbeans.org/NewAndNoteWorthy