Tuesday, September 15, 2009

Klicknation Lies



http://klicknation.com/
So here i was going through this add i got through this site i found through google ads, Klicknation. I figured I'd go through the site since they seem to have a 'catchy' name. They have this installation counter on front page like the one i've attached. so me being as curios as i was , wanted to find out how they update their 'installs' counter coz i remember firefox has one too. I went through the site code and they slapped on a simple javascript counter that just randomly comes up with a number. Those are not installs ,its just a number generated from the date. code below, Shame on you!!!:


var date = new Date().getTime()/1000;
var count = Math.round(7103455+(date-1234398246)/9);
function addCommas(x1)
{
var rgx = /(\d+)(\d{3})/;
while (rgx.test(x1)) {
x1 = x1.replace(rgx, '$1' + ',' + '$2');
}
return x1;
}
function inccount()
{
count = count + 1;
out = document.getElementById('counter');
out.innerHTML = addCommas(count.toString());
}
window.setInterval(inccount, 5000);

Wednesday, September 9, 2009

DVD not read under linux but read under Windows

So, today my dvd rom drive just decided not to work. I thought it was a dirty laser or something. Cleaned that but still it would not budge.
I then tried to manually mount it by adding the following entry to etc fstab:

/dev/sr0 /media/dvd auto,iso9660 ro,user,noauto,unhide 0 0

and running: mount /dev/sr0 as root on command line
now i can't be doing this everytime i pop a disk in drive. I mean its been working before.
After a few searches i came across this entry made by Hal that has been causing this whole mess.

in
File: /etc/hal/fdi/information/media-check-disable-storage_model_$YOUR_DEVICE.fdi


\false\



If the key is set to false (it was in my case), all you have to do is to change the value of the key to true.

good luck.
I'm using Fedora 10 x86