March 31, 2009

PS3 controllers on Windows via bluetooth

Filed under: Uncategorized — george @ 6:22 am

This link appeared to be interesting. A bit old but might actually work, and if not then have a look at the comments cause they seem to provide additional links.

http://davieslim.wordpress.com/2008/09/15/use-ps3-controller-in-windows-wireless-bluetooth/

March 27, 2009

Internet Domain fraudsters

Filed under: Uncategorized — george @ 2:39 pm

Forgot to register your domain name and lost it? Did your domain name provider mess things up and loose your domain? Does this sound all too familiar?

Some so called companies on the Internet are getting away with what is happening in the grey zone of the net, where no ethical law applies. What am i on about? Imagine if you forgot to pay your rent and you were suddenly homeless, and not because of the credit crisis.

2 years ago the dot com domain i owned got lost thanks to, partly my stupidity, and mostly to the stupidity of the person i trusted managing my domain, who also supplied my hosting. (NEVER EVER TRUST ANYONE IN THAT WAY, it is plain stupid, and i was stupid). Did that guy sell my domain to some other company? noone knows (kidding hehe)

Now picture this, you set up a company that simply registers domains the minute the expire, using automated systems, and of course under the nose of ICANN. These people get your domain, and you receive an email later on that they are selling your domain for 200 dollars or more. Amazing is it not? And what is ICANN doing about this?

NOTHING, ABSOLUTELY NOTHING

What these people are doing is unethical, they are earning lots of money by reselling domain names that others worked hard to build a reputation for. And once you loose your domain, there is no way of claiming it back, none. ICANN demands you pay them lots of money to do anything about it.

Does it sound like we are getting screwed by someone with a monopoly? Well yes we are, this is unacceptable.

The latest victim of this was a website called bballvideos dot com .

When this happened to me i actually did a lot of research on these people who you might remember from domain servers such as name-services.com and plenty of others. They seem to be using other “company names” as well to disguise themselves. I wonder how much they are turning over if noone is saying or doing anything about them.

March 3, 2009

Perl and Strings, Replacing multiple white spaces with one

Filed under: Perl,Technical — george @ 9:18 am

The following regex replaces multiple white spaces in a string with a single white space:
$location =~ s/\s+/ /;

It will actually replace occurances of a single space with another single space, so if you have a more elegant solution please share

Perl and Strings, trim

Filed under: Perl,Technical — george @ 9:06 am

Since perl doesn’t have a php like trim function, one way of getting around this is to use regular expressions replacing spaces. You can create subroutine to handle this inside the code or just use the following 2 regular expressions directly

$string =~ s/^\s+//;
$string =~ s/\s+$//;
#!/usr/bin/perl

# Declare the subroutines
sub trim($);
sub ltrim($);
sub rtrim($);

# Perl trim function to remove whitespace from the start and end of the string
sub trim($)
{
	my $string = shift;
	$string =~ s/^\s+//;
	$string =~ s/\s+$//;
	return $string;
}
# Left trim function to remove leading whitespace
sub ltrim($)
{
	my $string = shift;
	$string =~ s/^\s+//;
	return $string;
}
# Right trim function to remove trailing whitespace
sub rtrim($)
{
	my $string = shift;
	$string =~ s/\s+$//;
	return $string;
}

shamlessly borrowed this code from http://www.somacon.com/p114.php although the code itself is not at all complicated


29 queries. 0.190 seconds. Powered by WordPress.