For female geeks

001101010011011000110011001100100011011000111000001101110011011000110100001110010011010000111000001101100011010000110110001110000011011000110010001101100100010100110101001100100011011101000001001101000011100100110100001110000011010100110010001101110011011000110100001110010011010000110111001101100011010000110111001101100011010000111001001101000011011100110011001110010011011100110101001101000011100100110100001101110011010000110101001101100011011100110101010000010011010000110111001101000011011000110011001100000011010101000001001101010011001100110100001100100011001100110011001101100011000100110101001110000011010100110010001101100100011000110100001110010011010000110111001100110011000100110110010000110011010100110000001101110011011100110011010001000011001101000100

Good bye spam!

Since the spam increased that much up to 10k spam each week I searched for a solution. It came out that the combination of Akismet and Stop Spammer Registrations Plugin made it possible to have only 1 or 2 spam comments in the queue. I love it!

Good bye de@r spam!

Tags:

Subversion (svn) 1.8 on Debian 7 wheezy

Just installed a brand new debian and than I can’t use my working copies cause the svn version is still 1.6.x
So an upgraded is required!

 

wget http://opensource.wandisco.com/wandisco-debian.gpg -O /tmp/wd-deb.gpg
apt-key add /tmp/wd-deb.gpg
rm /tmp/wd-deb.gpg
sudo nano /etc/apt/sources.list

deb http://opensource.wandisco.com/debian wheezy svn18

So now I can have fun again! Why not git? Cause the company repos are still in svn and I had some troubles with git-svn.

Spam is increasing … alot!

Well since the last years the spam comments in this blog have increased.

2009    114
2010    970
2011    3013
2012    4537
2013    12916 and this year is not over yet. US gouverment talked about they took down some large bot nets. I’m not sure they were that successful as they say. How many bot nets might be in public cloud like ämäzön or so? It is hard to guess, but the massive flood of spam comments and even larger flood of spam email has increased. Also the scum mail in Real Life (TM) has increased. D’oh!

Tags: ,

MySQL not in other table

SELECT *
FROM   `a`
WHERE  NOT EXISTS
(SELECT *
FROM   `b`
WHERE  `b`.`id` = `a`.`id`)

Sicheres Password

Es tut uns leid, Ihr Passwort muss mindestens einen Großbuchstaben, zwei Ziffern, ein Symbol, eine inspirierende Nachricht, einen Zauberspruch, ein Gang-Logo, eine Hieroglyphe und das Blut einer Jungfrau enthalten.

__toString() must not throw an exception

__toString() must not throw an exception.

 

If you an exception handler even that seems fail (in itself) with __toString() must not throw an exception. There is no nice safe way to handle it. The easiest solution is to catch that error as well. It might seems to be odd, but on the other hand the exception hanler shall not fail ;)


/**
* String representation of this object
* @return string
*/
public function __toString()
{
try {
return (string) $this->name;
} catch (Exception $exception) {
return '';
}
}

Tags: ,

Javascript money format

Number.prototype.moneyformat = function(decPlaces, thouSeparator, decSeparator) {
	var n = this,
	sign = n < 0 ? "-" : "",
	i = parseInt(n = Math.abs(+n || 0).toFixed(decPlaces),10) + "",
	j = (j = i.length) > 3 ? j % 3 : 0;
	return sign + (j ? i.substr(0, j) + thouSeparator : "") + i.substr(j).replace(/(\d{3})(?=\d)/g, "$1" + thouSeparator) + (decPlaces ? decSeparator + Math.abs(n - i).toFixed(decPlaces).slice(2) : "");
};

usage:

var myMoney=3543.75873;
var formatedMoney = myMoney.moneyformat(2,'.',',') + ' EUR';

Tags: , ,

What is listen on my apache port?

On Windows it seems not to be that easy figure out if some process is listening on port 80 or 443.
A simple command line command can show the pid of the process that is listening.

netstat -ano | findstr /R 0.0:80 && netstat -ano | findstr /R 0.0:443

Easy ;)

Tags:

Akismet blows commentmeta wordpress

Today I noticed that the commentmeta table in the DB was huge, even the fact that I delete my spam daily. I saw that the commentmeta table had a size of 1,5 MB compared to the other tables with a few kb. I figured out that Akismet plugin caused that. I love that plugin cause it saved me a lot of time filtering the spam comments, but blowing my db is another thing. I have more than this blogs running with much more content. There is might be more trouble with the increase of the table.
However I executed the following query and the size of that table was only 7 kb. Woot!

DELETE FROM `wp_commentmeta` WHERE 
 `meta_key` = 'akismet_as_submitted' 
 OR `meta_key` = 'akismet_history' 
 OR `meta_key` = 'akismet_rechecking'
 OR `meta_key` = 'akismet_result' 
 OR `meta_key` = 'akismet_user' 
 OR `meta_key` = 'akismet_user_result';

Tags: , ,