Archive

Archive for August, 2011

Fedora 15 NVIDIA external Samsung SyncMaster… finally!

August 21st, 2011 3 comments

Ever since Fedora 15 came out, I couldn’t get my external monitor to work with my Lenovo W520 laptop which has an NVIDIA Quadro 1000M graphics adapter. I am using the proprietary driver and no matter what settings I would choose, I’d always get a nasty “Oops, something went wrong!” error message when logging in. I knew that there shouldn’t be a problem as I dual boot into Win7 and the external monitor was working fine.

Today I tried a few more combinations and finally got it working, most probably because I have chosen “TwinView” in the configuration, rather than “Separate X screen”. I also specified each screen’s resolution and refresh rates instead of leaving everything on “Auto”. Further settings include:

  • Screen 0: Absolute Position +0+0
  • Screen 0: Make this the primary display for the X screen
  • Screen 1: Position +1920+0 (where 1920 is the width of the laptop display)

My setup is perfect again.

Bluetooth

August 18th, 2011 No comments

Warning: There is swearing in this video clip.

Lee Evans brilliantly reminds me of a recent ex “boss” and makes me laugh no matter how many times I watch it.

Fun and games with JCC Payment Systems Ltd – Cyprus

August 16th, 2011 4 comments

JCC is Cyprus’ main credit card processor, seen by many involved in Cypriot eCommerce, as a nasty monopoly.

But it doesn’t stop at eCommerce, or what you think of as eShopping. JCC is used by many government and semi-government services for bill (and fine) payments. Those services, either sucked in and forced to use JCC, or who are using JCC because they know no better, are doing this via a site called jccsmart.com (don’t forget the “www.” prefix in front of that if you want to see their website; CNAME records and ServerAlias directives haven’t reached JCC’s NOC, that’s all).

My story is about a bill payment to the Sewerage Board of Pafos (S.B.P.). This is an annual bill which relates to the construction of the new sewerage system and I have successfully paid it online via jccsmart for a number of years already. Today however, I am greeted with an error message.

Communications error while establishing connection. No such host is known SocketException thrown by System.Net.Dns.GetHostByName(“Server”) in resolving the hostname.

Eh? JCC fix it! Right? So I send the screenshot to JCC only to receive the following reply from them:

Dear Chris,

The problem is from the Paphos serves and not of JCC. Please contact ΣΥΜΒΟΥΛΙΟ ΑΠΟΧΕΤΕΥΣΕΩΝ ΠΑΦΟΥ (Σ.Α.ΠΑ.) to correct the problem.

Thanks.

Did you get that peeps? If the serves are down, call and try to explain that the socket exception, no wait… revolver dns hostname… thingy, is broken and you need to fix it. Oh and you best ask for Panagis because he knows how to use Excel real good.

For completness of this post, this was my response:

Charilae,

It is not my job to contact SAPA to correct the problem.
If anything, it is JCC’s.

What business do I have with socket exceptions?
Surely, your developer(s) need to pick up the phone to resolve this issue.

Thanks.

After which of course I have received no response… and so I ask… isn’t this just rude and unprofessional of JCC? Or is it just me? If you’ve had any similar experiences with JCC, I’d like to hear about them. This is not the only JCC flaw that bugs me… there is more, such as when they convert my EUR to USD, then from USD to X (and all the surcharges all along the way) when I buy anything which is not EUR or USD, but that’s another story.

And JCC, we are not idiots, GetHostByName needs a valid hostname as a required parameter, not the word Server. You might find that if you fix that then, and if you get it right, GetHostByName will return the IP address of the Server you are trying to connect to. Here are some possible hints which are all legal hostnames:

  • john.sapa.org.cy
  • shitbox.sapa.org.cy
  • shitter.sapa.org.cy
  • skata.sapa.org.cy
  • honeywagon.sapa.org.cy

/rant

Categories: All, Cyprus
Tags: , , , ,

Simple PHP one-liner to generate random Lorem Ipsum (Lipsum) text.

August 16th, 2011 4 comments

Copying and pasting lipsum text from a site such as lipsum.com can be boring and tedious at times, especially when you would like to test multiple blocks and how well they will look with text of varying length.

Getting random lipsum of varying length is pretty easy in PHP, in fact you can do it on just one line of code:

$lipsum = simplexml_load_file(‘http://www.lipsum.com/feed/xml?amount=1&what=paras&start=0’)->lipsum;

Need more than one random string? Turn it into a method:

function random_lipsum($amount = 1, $what = ‘paras’, $start = 0) {

return simplexml_load_file(“http://www.lipsum.com/feed/xml?amount=$amount&what=$what&start=$start”)->lipsum;

}

Where:

  • $amount is… how much of $what you want.
  • $what is either paras, words, bytes or lists.
  • $start is whether or not to start the result with ‘Lorem ipsum dolor sit amet…
Categories: All, PHP, Web