Archive

Archive for January, 2012

Dear friends from Russia, thank you for the Lada Samara!

January 31st, 2012 2 comments

Lada Samara

For next year’s model, please send a photo of the airbags!

 
Categories: All, Personal

75 year old man drives in opposite direction on Limassol highway.

January 31st, 2012 No comments

I had heard about it on the radio, then on tv, then read about it online… now I’ve seen it on YouTube too!

 

To turn left or not to turn left? That is the question.

January 28th, 2012 No comments

To turn left or not to turn left? That is the question.

Categories: All, Cyprus, Only in Cyprus

The Paphos Mall

January 27th, 2012 1 comment

The Paphos Mall

Google men should clean the house!

January 27th, 2012 No comments

Google men should clean the house!

men are men and men should clean the house

Source: http://translate.google.com/#en|en|men are men and men should clean the house

Categories: All

Photo of snow covered Troodos mountain range in the sun.

January 27th, 2012 No comments

Click for a larger version.
Taken with a Canon EOS 550D Rebel T2i

Read more…

What nobody does is nobody’s business.

January 24th, 2012 No comments

Came across this article about the ‘nobody’ user on *nix systems and loved the closing sentence…

If you stare at the list of running processes on your server for long enough, you are bound to come across the user called “nobody”. Before you call a security expert and prepare to fight off a hacker, relax. While the username “nobody” may seem suspicious, it is actually supposed to be there.
.
.
Therefore, do not fear “nobody” and do not take any steps to hinder the user’s ability to run some of your critical applications, like the web server. What nobody does is nobody’s business.

There, you’ve been told!

Categories: All, Linux

Using sed to search and replace contents of next line in a file.

January 24th, 2012 2 comments

This example will show you how easy it is using sed to find a particular line in a file and replace all or part of the next line. In this example, using htaccess we want to deny access to all clients except a particular dynamic IP (for your home connection for instance).

Your .htaccess file might look like this:

order deny,allow
deny from all

# allow from example.dyndns.org
allow from 8.8.4.4

And your sed code to update the allowed IP address might look like this:

sed -i -r "/# allow from example.dyndns.org/I{\
n; s/([0-9]{1,3}.){3}[0-9]{1,3}/8.8.8.8/\
}" .htaccess

Let’s look at it piece by piece.

  • /# allow from example.dyndns.org/I will search the file for this string. The I flag at the end makes the search case insensitive.
  • n; will tell sed to continue processing on the next line.
  • s/([0-9]{1,3}\.){3}[0-9]{1,3}/8.8.8.8/ will regex search for an IP and replace the match with your updated IP (in this case 8.8.8.8).
  • .htaccess is of course the input file to process.

Note that in .htaccess files, comments must be on a line of their own. End of line or inline comments are not permitted. In cases where you do not need to replace a part of the next line but rather all of it, our replacement becomes s/.*/8.8.8.8/

Categories: All, Linux

Epson Stylus Photo PX830FWD

January 24th, 2012 No comments

I’ve recently purchased an Epson Stylus Photo PX830FWD which doesn’t seem to want to stop impressing me. Following the death of my last desktop PC, I needed a way to be able to scan again since there’s no way I’d ever be able to use my SCSI scanner. Wireless was the way to go as our lives are surrounded by laptops, tablets and smartphones not to mention the whole internet. Yes, this is a Google Cloud Print enabled printer which means I can print to it from my Android devices, or from Chrome, etc… wherever I am in the world. Epson have their own cloud print service if you prefer, but I haven’t tested it yet.

I was very happy to learn that I can use this device wirelessly from my Fedora machines as well since booting Windows just to scan wirelessly was not something that I was looking forward to have to do. If you do use Windows, the Scan-to-PC feature is pretty cool. It means that you can scan a bunch of documents at the scanner without touching a PC. I stuck Windows inside a VirtualBox guest, mounted a folder on my Synology NAS and scan to that directly. This way my scans are immediately accessible on my local network, remotely via scp/sshfs and even via the NAS’ web interface.

I haven’t tested the fax capabilities yet, but over and above manual mode there is a Print-to-Fax driver under Windows with it’s own address book. And if you ever run out of ruled or graph paper, stick a blank A4 sheet in it, press a button and hey presto. Stick in an SD card with pictures and it will even use a photo as a background. The 32GB Transcend Class 10 SDHC which I bought for my Canon EOS 550D Rebel T2i worked no problem with the printer.

I no longer have a need to print on CDs or DVDs myself, but it has it’s own built-in tray which sounds like a Transformer transforming as it moves around the internal parts of the printer during eject/insert. All in all, an excellent piece of kit which I would recommend any day. Now I need a good shredder (minimum DIN/Level 3). Any recommendations?

7 pounds

January 23rd, 2012 No comments

No, not the 2008 movie with Will Smith.

7 pounds

This is a scan of a newspaper article which appeared in the Cyprus Weekly back in 2003. Then, the currency of Cyprus was still the Cypriot pound. Having lived in Cyprus my entire life, I have always used the Metric system. 7 pounds from the Imperial system is indeed 3.17514659 kilograms but I am still baffled how the author came to write 7 pounds as £7. Could you imagine what would happen in the UK if the prices and the weights had the same symbol prefixed!?

This reminded me of a BBC article I read about a month ago, and I must wholeheartedly agree with a comment there:

“Fancy a Pint?” sounds better than “Fancy a Litre?”