Archive

Archive for May, 2011

Cyprus CY.T.A. issue patch for (at least) the THOMSON TG585 v7.

May 24th, 2011 3 comments

Customers of CyTA in Cyprus returning from a day at the office, might find their home internet connections down today.

Whenever trying to access a website, you are greeted with an (as usual) poorly designed message that CyTA has detected (clever people, not) that their modem requires a patch upgrade.

If you speak Greek only, you’re a little screwed if you use Mac or Linux… since the additional patches for these two are mentioned only under the English part of the message.

In any case, both of these extra patches are DOS/Windows executables anyway, so if you are anything like me, don’t bother with them at all. Instead, fire up a instance of XP in a VM which is in Bridged networking mode and just run the downloaded file.

After a while, I got something along the lines of “*** Patch was installed successfully ***” and that was it, my connection then worked as normal.

CyTA, if you are going to do something like this in the future, no matter how far away from now, it is still considered a courtesy to inform your customers beforehand, like other ISPs do. Finally, thank fook I didn’t have a problem and need to phone you, since I’m fed up of being given the runarounds on your stupid support number too. Haven’t called you for over a year and would like to keep it that way if I can. Blogs like this are more useful than anybody on your support line.

EDIT: Screenshot here.

Themes in CakePHP 2.0.0

May 23rd, 2011 5 comments

I’ve spent the best part of half a day trying to figure out why themes were not working for me in CakePHP 2.0.0

The closest I got to a solution can be found over on stackoverflow.com.

Difference is that you need to set $this->viewClass to ‘Theme’ instead of $this->view, but there are 2 more unmentioned issues with the sample code provided as a solution:

public function beforeRender() {
	if ($this->RequestHandler->isMobile()) {
		$this->viewClass = 'Theme';
		$this->theme = 'mobile';
	}
}

The first is that RequestHandler has been replaced by request.

So you may use:

if ($this->request->isMobile()) {

or

if ($this->request->is('mobile')) {

The other is that despite you’ve named your theme ‘mobile’, CakePHP’s new CamelCasing behaviours will turn this into ‘Mobile’. Because of this, you need your theme’s files to be located in ‘app/View/Themed/Mobile‘, and not in ‘app/View/Themed/mobile‘.

Categories: All, PHP, Web

Google Gmail tip – Keyboard Shortcuts

May 18th, 2011 No comments

Spotted this tweet today: “Never forget a keyboard shortcut again! Type “?” in Gmail to see a full list of shortcuts: http://goo.gl/VJCVE #tuesdaytip

Indeed, if you have Keyboard Shortcuts enabled in your Gmail Settings page, typing “?” will produce a neat looking reference guide with the shortcuts available to you.

Click the image below for the full view.

Google Gmail Keyboard Shortcurts

Categories: All, Technology

Masking fixed length strings in PHP.

May 17th, 2011 1 comment

A particular problem came up in the office today, masking of credit card numbers. As my friend Leonid has pointed out, one would think that this is a very simple task for any programmer. Or not.

Having read Leonid’s solution, and finding a comment on php.net which would also mask everything but the first and last four digits of a credit card number, I still felt that I needed to throw something of my own together. So here it is:

<?php
/**
 * Mask part of a string
 *
 * <code>
 * echo maskString('4012888888881881', 6, 4, '*');
 * </code>
 *
 * @param	string	$s		String to process
 * @param	integer	$start	Number of characters to leave at start of string
 * @param	integer	$end	Number of characters to leave at end of string
 * @param	string	$char	Character to mask string with
 * @return	string
 */
function maskString($s, $start, $end, $char = 'X') {
	$middle = '';
	for ($i = 0; $i < strlen($s) - $start - $end; $i++) {
		$middle .= $char;
	}
	return preg_replace('/^(d{' . $start . '})(d+.)(d{' . $end . '})$/', '${1}' . $middle . '${3}', $s);
}
?>

Sony Playstation PS3 Update 3.61 for Cyprus

May 15th, 2011 5 comments

I was rather late to find out about the 3.61 firmware update for the Sony Playstation PS3. Although I have updated my firmware, I have not yet received the email that the system has sent to my registered email address to reset my password.

Anybody in Cyprus who has received the email and got past this stage?

Categories: All, Cyprus, Technology

8TB of Seagate Barracuda Green ST2000DL003

May 15th, 2011 3 comments

Those of you who know me personally, will know that I am married. Those of you know me a bit better than others, will also know that yours truly lost all of the honeymoon pictures (and some) during the death of a hard disk.

8 years later, I am finally just a breath away from trying to make sure that the next honeymoon, well… won’t be lost.

Which is why I have finally taken the plunge, and invested in a NAS (Network Attached Storage) device. The Synology DiskStation DS410 (bought from amazon.co.uk). More about that later.

This post, is about the hard drives which will go inside it, to form an 8TB RAID-5 array, which means that I will have the redundancy of 1 of the 4 drives. I’m guessing that this will give me 6.3TB 5.44TB of usable space which is plenty for my needs.

And so, here is a picture of the largest amount of Made in China space I have ever been near (in my house):

Seagate Barracuda Green ST2000DL003 2TB

In Cyprus terms, at time of writing, that’s EUR €338.57 of your cash, available from my friends at Singular in Limassol.

I must add that I chose these drives over the (more expensive) Western Digital WD20EARS Caviar Green drives, due to a widely talked about issue with LCC (Life Cycle Count).

EDIT: My decision was also very much based on this review which compares the two drives.

Read more…

On the price of consumer electronics in Cyprus.

May 13th, 2011 1 comment

An interesting article has just popped up in the Cyprus Mail regarding Sky-high prices across Europe, mainly when it comes to the importation of consumer electronics. It is funny how this would appear now, as I have only just had to buy myself a NAS (Network Attached Storage) device which costs roughly half of what I paid in the USA.

The article introduces a new initiative of a team of enterprising expats in Limassol who have set up a site with samples of the differences in cost to purchase the same item across the EU. Below is a screenshot of a sample price comparison.

eurodonkey.eu

Cyprus as you can see is paying a hefty overhead. Both articles are worth a read if you buy stuff online.

As for my recent experience, Cyprus has a single “distributor” of the product I bought. As is often the case, they did not bother to respond to my queries as to how I can buy their products in Cyprus. Knowing that it would still be cheaper to bring it from another country, I went ahead and bought it. Hey, if they don’t need my business… I’ll just take it elsewhere.

Read more…