rulururu

post Introducing GMail Custom Time

April 1st, 2008

Filed under: Internet, Nonsense — Kai @ 9:18 am

On the newer and older version of Gmail, but not in the basic HTML version, in the upper right corner, next to Settings, a link appeared labeled, “New! Gmail Custom Time”.

The page claimed a new Gmail feature had been added that would allow people to date stamp their emails in the past, allowing for all sorts of mischief. Users would be limited to ten Custom Times a year to minimize the number of fraudulent emails.
You’d probably ask why exacly ten. Their researchers have found out that allowing each person more than ten pre-dated emails per year would cause people to lose faith in the accuracy of time, thus rendering the feature useless.

Their findings:
formula

N = Total emails sent
P = Probability that user believes the time stamp
φ = The Golden Ratio
L = Average life expectancy

screeny

With GMail Custom Time, you can date your email in the past. Just click “Set custom time” from the Compose view - any email you send to the past appears in the proper chronological order in your recipient’s inbox. You can opt for it to show up read or unread by selecting the appropriate option.

The link led to a 404 error before April 1st. - It now leads to their latest hoax, Gmail Custom Time.

Clicking any of the three links at the bottom of the page brought the user to a page indicating that Gmail Custom time was, in fact, their April Fools prank for 2008.

post I {love} Unicode

March 27th, 2008

Filed under: Internet, Nonsense — Kai @ 8:51 pm

Inspirated by a post of Jeff Atwood on Codinghorror I, some minutes ago, designed and ordered this shirt:

Shirt

I thougth it was funny ’cause even if you don’t do programming with unicode you surly encounter unicode - e.g. when setting the doctype of a website.

At least if you haven’t had “a chance” to deal with this subject the way I would have liked to yet you’d read Unicode and You. I’m very much assured that it will help you to understand the basics.

Listen what Joel Spolsky from joelonsoftware.com in 2003 had to say:

So I have an announcement to make: if you are a programmer working in 2003 and you don’t know the basics of characters, character sets, encodings, and Unicode, and I catch you, I’m going to punish you by making you peel onions for 6 months in a submarine. I swear I will.

post Realtime Apache monitoring with apachetop

March 17th, 2008

Filed under: Internet, Linux, Software — Kai @ 5:10 pm

Using apachetop you can watch every request on your apache webserver smiliar to watching progresses with top at your local system.

It works by processing the logfiles found in /var/log/apache.

By default apachetop will use your log in /var/log/apache/access.log, but you can add a -f flag to the command and point it to wherever your apache log really is if you moved it.

apachetop -f var/log/httpd-access.log

In the header of the output apachetop generates some small statistics about number of requests, the transfered data and the returned status codes since apachetop was started and for also for the last 30 seconds.
Additionally the last few requests are listed. Press “d” to switch from requested urls to refferrers or client IPs.

Man Page:
apachetop(1)
Project Page:
Apachetop - Top-like display of Apache logs

post Caffeine Kills You

March 14th, 2008

Filed under: Internet — Kai @ 7:04 pm

109.89 cans of Afri Cola + Me = Death.

This has nothing to do with software development, but seems too cool to left it uncommented.

Afri Cola

On my odyssey thought the world wide web I came across that funny website.

The calculator tells you how many drinks of your favorite caffeinated drink you can consume before dying.
Take this quick test and find out.

Good thing is that I don’t drink Coke or other coffeine drinks that often - bad thing about is that far less coffein will probably kill me because of the heartburn I get from ;)

Every programmer should review this before stepping over that line. :D
By the way a 12 ounce can of Afri Cola contains 89 milligrams of caffeine.

post RobotTurK: Disaster Emergency Video system

March 5th, 2008

Filed under: Internet, WPF — Kai @ 7:24 pm

I found an article that’s worth reading on msdn blogs. It looks more funny than it probably should.

At first I got to tell you what Microsoft Robotics Studio is.

The Microsoft Robotics Studio is a Windows-based environment for robot control and simulation. It is aimed at academic, hobbyist, and commercial developers and handles a wide variety of robot hardware.

RoboTurk employs Unmanned Aerial Vehicles (UAV) equipped with cameras that are capable of steaming live video of disaster struck areas to any number of ground command stations. The helicopter carries onboard an eBox compute-unit that runs Microsoft Robotics Studio, allowing the robot to execute specific command issued by ground statation or to auto-fly or safely land. The ground stations utilizes Windows Server 2008 Media Services that capture, process and streams video.

Helicopter

Other illustrations in the post are not less fun. Have a look:

RobotTurK: Disaster Emergency Video system on Microsoft Robotics Studio Blog

By the way, for developers it might be interesting to know that for streaming Silverlight, which is the web part of WPF, is used.

post Better directory listing with PHP

March 3rd, 2008

Filed under: Internet, PHP — Kai @ 10:30 am

When a web browser is pointed to a directory on your website which does not have an index.htm(l) in it, the files in that directory can be listed on a web page.

It’s typical for most server setup that directory listing is disabled. You can overwrite apache’s options with .htaccess file.
Just Change:

Options +Indexes

If you do use this option, be very careful that you do not put any unintentional or compromising files in this directory. And if you guessed it by the plus sign before Indexes, you can throw in a minus sign (Options -Indexes) to prevent directory listing entirely.

If you want the directory contents to be listed, but only if they were HTML pages and not images:

IndexIgnore *.gif *.jpg

I used this for years without problems but now I wanted to have a better look for the list.

My idea was a PHP script that takes the file structure of a specified folder and outputs it into a stylable format. It should simply lists the different folders as links, but not in the standard (boring) format. I want to be able to put it in my template.

Solution is a PHP script that has a definied path (or takes the path where the script is located) and then uses opendir function to generate an array. When iterating the array a difference has to be made if the accessed item is a file or directory.
Additionally the filesize of each item is detected.

<?php
$dir = opendir (dirname(__FILE__));
$exclude = array("index.php", ".", "..");
 
while($fn = readdir($dn)) {
	if ($fn == $exclude[0] || $fn == $exclude[1] || $fn == $exclude[2]) 
            continue;
	$list[] = $fn;
}
 
sort($list);
 
 
foreach ($list as $item)
{
  if (is_dir($item)){
	$dir .= "<img src='/img/dir.png'>&nbsp;<a href='$item'>$item</a><br>";
  }else{
	$size= filesize($item);
	$m = 'bytes';
	if ($size > 1024) {
		$size=round($size/1024,2);
		$m = 'KB';
	} elseif ($size > 1024*1024){
		$size = round(($size/1024)/1024,2);
		$m = 'MB';
	}
	$a .= "<img src='/img/file.png'>&nbsp;<a href='$item'>$item</a> - $size ($m)<br>";
  }
  echo $dir . $a;
}
 
closedir($dir);
?>

This works well but it it has no great advantage over the standard directory listing. The script can be put into a nice styled page that is not as boring as the standard. It would have costed me some time to extract the filetype out of the filename and then load an appropriate image for it.

To save time my choice is a script that generates a well formed table, listing the contents of a specified directory and sub-directories. Has image tags associated with certain file types and the ability to generate thumbnails to preview image files.

Directory Listing Script by Evoluted

Dirlist

A different styled solutions is PHP Directory Listing on freshmeat.net. It displays the content of a directory and automatically creates thumbnails. Caching is done for JPEG, GIF, and PNG files.

A stylish directory listing continuously improves the user-friend user friendliness a lot.

ruldrurd
« Previous PageNext Page »
Powered by WordPress, Content and Design by Kai Bellmann
Entries (RSS) and Comments (RSS)