Try new GMail Navigation Menu

If you would like to try the new GMail Navigation Menu and you are not yet receiving the update you can force it by changing the content of the google cookie.
If you use Chrome, Firefox, Safari or Internet Explorer 8+, open google.com in a new tab, load Chrome’s JavaScript console (Ctrl+Shift+J), Firefox’s Web Console (Ctrl+Shift+K), Safari’s Web Inspector (how to do that?) or IE’s Developer Tools (press F12 and select the “console” tab) and paste the following code:

document.cookie=”PREF=ID=03fd476a699d6487:U=88e8716486ff1e5d:FF=0:LD=en:CR=2:TM=1322688084:LM=1322688085:S=McEsyvcXKMiVfGds; path=/; domain=.google.com”;window.location.reload();

Then press Enter and close the console. If you’re not in the US and you’re using a different Google domain, replace “.google.com” with your domain in the code (for example: “.google.co.uk” in the UK). Please note that this only works for the English interface, so you many need to adjust the language in the preferences page.

Eclipse Access Restriction Error

Clickide 3

Image via Wikipedia

When in Eclipse you have an error like: “Access restriction: The constructor AppletAudioClip(URL) is not accessible due to restriction on required library C:\Programmi\Java\jdk1.6.0_24\jre\lib\rt.jar” You simply need to follow these steps to avoid compilation error:

Click on the Properties of your project Go to Java Compiler–>Errors/Warnings search for “Deprecated and Restricted API” and set to warning “Forbidden reference (access rules)” item.

That’s it.

Opening ports using iptables

Screenshot Firestarter: Das Logfile von iptabl...

Image via Wikipedia

To open a port by using iptables you can use the iptables command, assume for example that you want to open port 25, you have to issue on the shell the following command

iptables -I INPUT -p tcp –dport 25 -j ACCEPT

where -I instruct to not add the rulle after the deny all rule avoiding to not be checked by iptables. At the end you have to save your changes with

service iptables save

and restart the service with

service iptables restart

However you can also edit directly the configuration file that in CentOS is in /etc/sysconfig/iptables

Aruba 8 Luglio 2011 Server Down

Molto probabilmente la web farm di aruba è andata nuovamente giù.

Sia il sito ufficiale (http://www.aruba.it) che i servizi associati (email, hosting ed housing) non risultano funzionare….

Al momento non si hanno notizie ufficiali al riguardo.

Update 1

Pare che abbiano avuto nuovamente un problema al nuovo gruppo UPS…. ora provo a sentire un loro commerciale…..anche se l’ultima volta che ho provato non funzionava nemmeno il loro centralino

Update 2 ore 14:20

Il sito aruba è nuovamente operativo, ed anche i nostri siti online http://www.nextant.it,  (anche i servizi di posta).

Continue to run script even when closing a remote shell

mplayer running from a command line prompt, vi...

Image via Wikipedia

When you run a remote shell (for example putty) and you start a remote cli program (e.g. tomcat, servicedesk, jboss and so on) when you close the remote shell normally they would terminate. To avoid this situation you can try to run the program in background (adding & at the end of the command or using the combination CTRL-Z and after the command bg)  but there are some cases in which the child process will continue to receive signal from the parent process (e.g. SIGINT), so you can overcome this by using the nohup command (which will cause the program to ignore signals sent from the shell).

Example think that you have a run.sh script to run,  to avoid to be interrupted when you close the remote shell just write this:

nohup run.sh &

How to mount LVM partition on Ubuntu

Creating the main partition for ubuntu

Image via Wikipedia

Mounting is an easy process to do, provided the filesystem type you are using is supported. What happen when you have an LVM formatted disk, and you need to mount it because the disk cannot be booted and a hell lot of valuable data kept inside?? Do not worry, because the solution is here…….

1. Get a live cd, for example, Ubuntu. For this article, I use Ubuntu 6.06 (I cannot find any latest version of ubuntu at my place)

2. Boot using the live cd. Search for these tools: lvm2. If the cd do not have it, install it.
# apt-get install lvm2

3. To make sure the harddisk is recognised, you can use fdisk
# fdisk -lu

4. Once installed, run pvscan to scan all disks for physical volume. this to make sure your LVM harddisk is detected by Ubuntu
# pvscan
PV /dev/sda2 VG VolGroup00 lvm2 [74.41 GB / 32.00 MB free]
Total: 1 [74.41 GB] / in use: 1 [74.41 GB] / in no VG: 0 [0 ]

5. After that run vgscan to scan disks for volume groups.
# vgscan
Reading all physical volumes. This may take a while…
Found volume group “VolGroup00” using metadata type lvm2

6. Activate all volume groups available.
# vgchange -a y
2 logical volume(s) in volume group “VolGroup00” now active

7. Run lvscan to scan all disks for logical volume. You can see partitions inside the hard disk now active.
# lvscan
ACTIVE ‘/dev/VolGroup00/LogVol00’ [72.44 GB] inherit
ACTIVE ‘/dev/VolGroup00/LogVol01’ [1.94 GB] inherit

8. Mount the partition to any directory you want, usually to /mnt
# mount /dev/VolGroup00/LogVol00 /mnt

9. You can access the partition in the /mnt directory and can backup your data

Note

This post is a copy of http://linuxwave.blogspot.com/2007/11/mounting-lvm-disk-using-ubuntu-livecd.html. This is a valuable info, so to avoid to not be able to reach the site in the future I have copied it instead to just link it. If the author feels that its copyright are beeing violated can ask me to remove the post.

Enable keywords substitution using Eclipse and Subversion (SVN)

Vista-eclipse

Image via Wikipedia

To enable keywords substitution as I usually have with the CVS, you just need to enable a svn properties on the Eclipse project configuration.

These are the steps to activate the svn-keyword-substitution feature in Eclipse:

  1. Install Subclipse into your Eclipse application
  2. Right-mouse-click on your project folder, and choose Team => Set Property from the popup menu (note to click on the root of the project folder)
  3. Enter the property name:  svn:keywords
  4. Enter the text property:  Author Date Id Revision HeadURL
  5. Click the  Set property recursively checkbox
  6. OK

Note that on large project files this action could take also several minutes. Now keywords are substituted when you commit a file in SVN, just like they were by using CVS.  Also, you can shorten Revision to Rev and HeadURL to URL.

So if you now have a file like:

// File name: $HeadURL$
// Revision: $Revison$
// Last modified: $Date$
// Last modified by: $Author$
//
//  file description

commiting it to the SVN will result into:

//  File name: afile.php
//  Revision: 1
//  Last modified: 2010-11-4 14:53
//  Last modified by: quonn
//
//  file description