Author: mario
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!
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!
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 ''; } }
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';
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 ;)
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';
Author Archive
Archives by Month:
- January 2025
- December 2024
- November 2024
- October 2024
- August 2024
- April 2024
- January 2024
- December 2023
- November 2023
- July 2023
- May 2023
- April 2023
- March 2023
- February 2023
- January 2023
- December 2022
- October 2022
- September 2022
- August 2022
- July 2022
- May 2022
- March 2022
- February 2022
- November 2021
- October 2021
- September 2021
- August 2021
- July 2021
- June 2021
- May 2021
- February 2021
- January 2021
- August 2020
- July 2020
- June 2020
- April 2020
- January 2020
- December 2019
- November 2019
- October 2019
- May 2019
- April 2019
- March 2019
- January 2019
- October 2018
- August 2018
- June 2018
- April 2018
- March 2018
- February 2018
- November 2017
- June 2017
- April 2017
- February 2017
- January 2017
- November 2016
- September 2016
- May 2016
- February 2016
- September 2015
- August 2015
- July 2015
- May 2015
- April 2015
- March 2015
- February 2015
- January 2015
- December 2014
- November 2014
- July 2014
- June 2014
- April 2014
- January 2014
- December 2013
- August 2013
- July 2013
- June 2013
- May 2013
- April 2013
- February 2013
- January 2013
- December 2012
- November 2012
- October 2012
- August 2012
- July 2012
- June 2012
- April 2012
- March 2012
- February 2012
- January 2012
- December 2011
- November 2011
- October 2011
- September 2011
- August 2011
- July 2011
- June 2011
- May 2011
- April 2011
- March 2011
- February 2011
- January 2011
- December 2010
- November 2010
- October 2010
- September 2010
- August 2010
- July 2010
- June 2010
- May 2010
- April 2010
- March 2010
- February 2010
- January 2010
- December 2009
- November 2009
- October 2009
- September 2009