Feb 222012
 

It’s funny how through small daily tasks sometimes it happen to find new features or commands that you do not knew not, and today this thing happened to me.
In particular, I had to do something trivial on the shell of a server, run : command1 | tail-n 2 i use tail to keep, from a significant long output, only the last 2 lines which then i use in another function, but beyond this, I needed to understand if command1 was terminated with an exit code of 0 or if the code was not 0 which number it was.

A simple:

....
comando1 | tail -n 2 
if [ $? -ne 0 ]
	then
		echo "comando1 fallito."
		EXIT_CODE=1
	fi
....

Does not work because the exit code comes from the command tail, which in my case is always 0.
So I Googled a bit and found more than a solution for this simple problem.
Continue reading »

Flattr this!

Feb 152012
 

Today I want to just give you a pill, but I’m sure that even if is short this article will save a lot of time to someone who, like me, has this requirement.
Having a machine with Linux and various IP (which can be IPv4 and / or ipv6) and a Squid Proxy Server configure your browser to use that proxy on one of these IP and go out from that server with the same IP and not with the default ip .

This can be useful if you have services that require 1 specific IP to be allowed, or if you want to give the proxy server to different people and still be able to trace what they do.
To achieve this we’ll use the ACL, Squid has very good ACL’s (Access Control Lists) built into the squid.conf file, allowing you to lock down or control the access by names, IP’s, networks, time of day, actual day. Remember however that like every firewall the more complicated an ACL is, the slower Squid will be to respond to requests. Continue reading »

Flattr this!

Feb 122012
 

There are many people that have old computers in their basement or attic, and they do not use it because they are considered too old and outclassed.
Today we will see a possibility to recover an old PC, we will see how to turn your PC into a fantastic digital Jukebox. You will have the opportunity to listen to music like a professional real station! What do you need? Nothing more than your old PC and, of course, some average speakers or audio system.

If you want the best, pick up your Android smartphone and you will see what we can do! Continue reading »

Flattr this!

Feb 072012
 

Today i publish another interesting article of Ankur Aggarwal, follow him in his Blog about Floss Stuff.

We all need to look for word definition. Online dictionaries and wikipedia are great but we are not always connected to the net. sdcv is a console version of StarDict dictionary. Using sdcv you can search for definitions while still offline. So here are the step to install and make use of this great program.
Continue reading »

Flattr this!

Feb 042012
 

Article by Giuseppe Sanna

If your desk is like mine: you have multiple PCs and Laptops spread over two square meters, but do not worry I have the solution for you!
Install Synergy and you’ll just say goodbye, once and for all to the mess!

This software, which I emphasize is cross-platform, allows you to control multiple PCs or laptops with just one mouse and one keyboard. Basically this software allows you to have two monitors on your desk and allow you to switch from the left monitor, to the second monitor just by moving the mouse out of the right border of the first one and vice versa.
This sounds simple … but be aware that we are not talking about two monitors attached to the same PC, but two different PCs even with different OS such as Ubuntu and Windows.

Today we will see how to configure this software, with two PCs, with the host (or rather, the head) on an Ubuntu and the client (host dependent) a Windows.
Continue reading »

Flattr this!