Google Public DNS, new way of tracking people?

December 8th, 2009

Google launched its experimental Public DNS service, acclaiming that it is faster, more secure and powerful than most of other DNS services available in most cases. To me, as it is a good alternative, it is just another way of tracking site usage, and publishing directed ads more precisely. It is ironic that I feel the hands of Google more everyday, and like the services they offer. Anyway, I think I will use this experimental service, as unfortunately the people managing communications related stuff in my country are banning sites for simple reasons everyday. Shame on you!

Google Public DNS

Internet

A Trip to Pamukkale, Denizli

December 8th, 2009

After long hours of working and studying, it felt good to open up my eyes in a trip to Pamukkale for vacation. Pamukkale is well known with thermal water sources and (of course) gorgeous travertine. Lying up in water at 50 degrees celsius, wandering around and taking photos in historic places like Aprodisias and Hierapolis, visiting an old friend and having good time. Here are the photos.

Photography, Travel

Session is lost when including a page in frame from another site

September 30th, 2009

While trying to create an application for one of our resellers, I realized that session data on our side is lost when they include our application in an iframe on their site. This is because on some browsers (IE mostly), when you reference cross site pages by frames, cookies are not enabled for the site you reference. As session data is dependent on cookie, you loose session state too.

To prevent this, you should add a P3P header data to your referenced page header like below. You can add this to your global.asax for your dot net application.

1
2
3
4
protected void Application_BeginRequest(Object sender, EventArgs e)
{
    HttpContext.Current.Response.AddHeader("p3p", "CP=\"IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT\"");
}

ASP.Net, Programming , ,

New site for Zaplat, tweaking SheetMusicTrade and a trip to Gelibolu

September 24th, 2009

Haven’t been posting lately, I have been busy with a major update for Zaplat, one of the first video sharing services in Turkey. Trying to speed things up a little bit, I have found myself struggling with AJAX updates, new video sharing features and lots of coding. I hope first beta will be available by the end of this month.

Today I have finally had some time to add the missing pages to administration pages of SheetMusicTrade, just after I realized that there are some bogus sheets added (one of them was a manual for some machine parts, I guess). I will keep an eye on the site more closely from now on.

Me and my wife had a trip to Gelibolu (Saros exactly) and had a great time there. Visited almost all of the monuments for the people died there during 1st World War and prayed for the heroes that fought like in hell without a second thought for the independent Turkey under the command of the great commander Mustafa Kemal Ataturk. Here are some photos…

 

Programming, Travel , , ,

Preserving values of password fields after postback

August 18th, 2009

You have created your sign up form with full power of AJAX but when you do your trick to check for username availability via AJAX, it seems that passwords fields are reset. You can overcome this situation by setting up passwords filed values each time you make a postback.

1
txtPassword.Attributes.Add("value", txtPassword.Text);

That should do the trick!

ASP.Net, Programming , , ,

Find Large Files on Ubuntu

July 11th, 2009

Here is the command that you can use to find files larger than 2G (quite usefult for application with 2G filesize limit, like INN2 compiled without large file support.)

1
find / -type f -size +2G -exec ls -lh {} \; | awk '{ print $8 ": " $5 }'

Internet, Linux ,

INN Problem with History File over 2GB

July 6th, 2009

If your INN distribution is not compiled with large file support (and your file system does not support files over 2GB) innd can die unexpectedly whenever your history file gets over 2GB. You can locate your history file under pathdb (/var/lib/news for me). If it is over 2GB you can change remember settings to a lower value to decrease the size of the history file.

To do so, edit your expire.ctl and change the remember setting to a lower value (5 days for me) and run makehistory and makedbz to rebuilt the files. Now, check your history file size and verify that it is below 2GB. You can run your innd properly now.

Internet ,

INN 2.5 configuration tips

July 3rd, 2009

Been busy configuring an INN 2.5 setup to get header feeds for Newzbox.com, I have a small list of tips to configure INN.

It seems that CNFS is ideal for storing large numbers of posts. Looking at the man page, it can be configured by editing cycbuff.conf file in /etc/news. You need to add lines to configure CNFS files and metadata like this.

1
2
cycbuff:CYC01:/home/news/cycbuff1:2097151
metacycbuff:HEADERS:CYC01

This enables using a file at /home/news/cycbuff1, sized 2097151 Kbytes (2GB is the limit on some systems, and 2GB would be quite sufficient for me now). And by creating a metadata definition named HEADERS, we enable this CNFS file (CYC01) to be used in storage.conf.

We should now edit the storage.conf file to use this HEADERS CNFS files. The lines below tells INN to use it for binaries groups. For all other groups you should add another CNFS file,or maybe a timehash file to store that groups.

1
2
3
4
5
method cnfs {
    class: 1
    newsgroups: *.binaries.*
    options: HEADERS
}

After finishing all configuring stuff, you can reload the server via;

1
/usr/lib/news/bin/ctlinnd reload all reason

But after editing inn.conf and storage.conf files you need to restart innd by the command below.

1
/usr/lib/news/bin/ctlinnd xexec innd

To configure the feed host you need to edit incoming.conf file, and add the lines below.

1
2
3
4
5
peer <myfeed> {
  hostname: feedhost.com
  streaming: true
  max-connections: 10
}

And to add groups to capture, you need to first throttle the server, add the group and start the server again.

1
2
3
/usr/lib/news/bin/ctlinnd throttle reason
/usr/lib/news/bin/ctlinnd newgroup alt.binaries.boneless
/usr/lib/news/bin/ctlinnd go reason

You can use the command below to get the status of CNFS files.

1
/usr/lib/news/bin/cnfsstat

And the command below to get an overall status of the INN.

1
/usr/lib/news/bin/innstat

For more information you can read man pages.

Internet , , ,

Fresh ideas for Sheet Music Trade

July 1st, 2009

After a field research process I made a list of new ideas and tweaks that I should complete before starting any actions that make the site reach to the masses. Without giving up many details I can say that the list includes more Youtube integration,
more user interaction and user generated content. I would like to hear your opinions about the site, feel free to contact me.

Internet, Music ,

Getting selected values of an checkbox array with JQuery

July 1st, 2009

With JQuery it is extremely easy to collect the checked values of an checkbox array. You can use the code below to collect checked items of an array named “itemSelect[]” and give an alert if none of them are checked. This code submits the collected data via ajax to “/ajax_do_something.php” to process the data. If sucessfully processed it refreshes the page to display new data.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
var selectedItems = new Array();
$("input[@name='itemSelect[]']:checked").each(function() {selectedItems.push($(this).val());});
 
if (selectedItems .length == 0) 
    alert("Please select item(s) to delete.");
else
    $.ajax({
	type: "POST",
	url: "/ajax_do_something.php",
	data: "items=" + selectedItems.join('|'),
	dataType: "text",
	success: function (request) {
	    document.location.reload();
	  },
	error: function(request,error){
	    alert('Error deleting item(s), try again later.');
	  }
	}
    )

JQuery, Javascript, Programming