Wednesday, October 26, 2011

Eclipse syntax highlighting: how to configure same occurrence color properly

Eclipse has some nice syntax highlighting feature, especially with the popular add-on "Eclipse Color Theme" from the Market place. The result is pretty nice, at least for my taste:


(here the obsidian theme)
On very nice feature is the ability to highlight automatically same occurrences of same. Unfortunately as you see here the "follow" keyword is totally bloated and unreadable. 

This can be configured, but it's that there's a legion of option for syntax highlighting. This one is actually controlled by "annotations", more specifically "C++ occurences":


And its suddenly much more readable.


Friday, October 14, 2011

Enabling proxy under Debian



In order to enabled a proxy, there's two main places (at least for my use this did the trick, there's probably are others). The first one is simple defining the following variables:
export http_proxy="http://your.proxy.com:your_port"
export ftp_proxy="http://your.proxy.com:your_port"

Secondly in order to have apt-get work through proxy, you need to update /etc/apt/apt.conf.d/proxy (or create it):
Acquire::http::Proxy "http:///your.proxy.com:your_port";



VirtualBox: Creating new VM by duplicating existing one

The other day i tried to create a new VM by duplicating an existing one. Everything worked perfectly ... except all network interface were disable. And it was impossible to mount up those network interfaces.

If you duplicated a new VM from an existing one, you have to do a couple of things. First MAC addresses should be changed in new VM.

Then once the VM is created, disabled all network interface and boot it up. Once the machine is started, there's a couple of files to update for the hostname. I'm using a Debian squeeze, so path may change in other distributions:

/etc/hosts 
/etc/hostname

Then you need to need to edit  /etc/udev/rules.d/.  What happens is it maps the "new" mac address to a new interface. You just need to remove the old one and rename the new one (thanks to the solution from this forum: https://forums.virtualbox.org/viewtopic.php?t=7749)