hidden gnome fish

  1. Open the Run Application dialog (Alt + F2)
  2. Enter “free the fish” (without the quotes)
  3. Press Enter

Another way to invoke it:

  1. Right-click your Gnome panel
  2. Click About Panels
  3. Press the “F” key three times

And another easter egg (really lame, but this one is easy to quit):

  1. Open the Run Application dialog (Alt + F2)
  2. Enter “gegls from outer space” (without the quotes)
  3. Press Enter

CPanel: permanent whitelist static IPs/hosts using antirelayd/relayhosts

If you are using CPanel you already know that its mail server (exim) uses a mechanism to allow pop-before-smtp relaying for sending outgoing emails. The IPs allowed to relay on the server are added dynamically to the file /etc/relayhosts by the antirelayd daemon.

The exim configuration for this:

/etc/exim.conf: hostlist relay_hosts = lsearch;/etc/relayhosts : localhost

What is antirelaydantirelayd is a daemon that checks /var/log/maillog for pop3/imap logins and keeps track of valid ones for use with smtp relaying. It manages the /etc/relayhosts file automatically so if you are trying to add a static IP in that file it will be cleaned up by antirelayd.
So how can we whitelist some IP and add it permanently to the allowed hosts to relay mail using the server? Well this is very simple but not documented properly (you can easily see this if you are looking into the file /usr/sbin/antirelayd that is just a perl script). So all you have to do is create a file (if no such file exists) called alwaysrelay in /etc and add the IPs you always want to be allowed to relay outgoing mails on the server. Normally /etc/alwaysrelay will not exist, but if it does just edit the file and append the needed IPs.

/etc/alwaysrelay 192.168.0.100 192.168.0.101

and add each IP on a separate line. After this either restart antirelayd or wait for a little while and it will automatically include these IPs in /etc/relayhosts and they will not be cleaned any more (permanent relay).

The same result can be achieved by creating a different file (for ex. /etc/staticrelay) and including it in the exim configuration (in the relay_hosts config similar to /etc/relayhosts). This file will be manually maintained and not cleaned up by antirelayd so the result is the same. Choose the method that you prefer (either antirelayd or exim.conf)

Vim syntax coloring centos

First you need to install yum install following:

vim-common vim-enhanced vim-minimal

If you still don’t have syntax coloring open this file /etc/vim/vimrc and add following line: syntax on If this line already exist just uncomment it.

Generate strong password inside bash shell

We can easily generate strong password directly from our terminal by adding this line to our ~/.bashrc file.

genpass() {
        local l=$1
        [ "$l" == "" ] && l=20
        tr -dc A-Za-z0-9_ < /dev/urandom | head -c ${l} | xargs
}

After we need to reload bashrc:

source ~/.bashrc

run genpass command in terminal and you will get randomly generated 20 symbol password.

RPM -e Error Specifies Multiple Packages

root@satesto [~]# rpm -qa | grep gpm
gpm-1.20.1-74.1
gpm-1.20.1-74.1

You might think how can it be that i have install two identical packages at the same time ? Well this is because rpm -qa does not displays architecture of packages.

root@satesto [~]# rpm -q --queryformat "%{name}.%{arch}\n" gpm
gpm.x86_64
gpm.i386

Link #1