Jan 09 2010

[Linux] “network unreachable resolving XXXX” messages in system log

Category: Articles,Linux administrationFractalizeR @ 3:10 pm

Some time ago I noticed many messages in log file about named attempt to resolve strange addresses.

Continue reading “[Linux] “network unreachable resolving XXXX” messages in system log”

Tags: ,

Jan 06 2010

Free opensource Symfony-friendly IDE: NetBeans 6.8

Category: Articles,PHPFractalizeR @ 8:03 pm

My search for a good PHP IDE never stops 😉 My choice was Zend Studio until recently. But Zend Studio is not free and it’s free analogue – PDT – lacks some features like refactoring (PDT is also mainly developed by Zend, so, I think, Zend will always keep it low to prevent competition with Zend Studio). Also, it is monstrous (More than 300Mb installer) and it definitely lacks good Symfony support.

Recently I came across NetBeans, which is now free and developed by Sun. Sun seem to abandon all own IDE projects in favour of NetBeans, so this is a somehow strong foundation.

Oh… 25Mb installer only for PHP version 😉 And… it is easy to use. Very. I would like to guide you through the creation of new symfony project in NetBeans.

Continue reading “Free opensource Symfony-friendly IDE: NetBeans 6.8”

Tags: , ,

Jan 06 2010

[JavaScript] EditArea: Realtime Syntax Highlighting JavaScript Library

Category: Articles,JavaScriptFractalizeR @ 3:19 pm

Recently, improving my WordPress plugin WP-SynHighlight, I chose EditArea as a source code editor with realtime syntax highlighting. The syntax of language description files for highlighting of EditArea is pretty much the same as Geshi has. So, I wrote a small converter and executed it over all Geshi files for 1.0.x version.

I have posted a patch for EditArea with all generated files.

So, now you can have EditArea with almost all power of supporting more than 130 languages 😉

Tags: , ,

Jan 06 2010

[JavaScript] PHP PCRE_DOT_ALL option emulation in JavaScript

Category: Articles,JavaScriptFractalizeR @ 2:06 pm

Writting my WP-SynHighlight WordPress plugin, I came to a need of parsing multilined shortcode like this:

[ codesyntax option1=”optionvalue1″…] <many lines here….> [ / codesyntax]

So, I extracted regular expression to parse shortcode from WordPress source code (if you are interested in it, see /wp-includes/shortcodes.php file). This regex was executed with /s option (PCRE_DOT_ALL) which makes dot (“.”) to match newlines also. There is no such option in JavaScript for some reason and I had to replace dot by such character class:


Actually, any opposite metacharacters should work. [\W\w] for example.

Quite easy, isn’t it? 🙂

Tags: , ,

Jan 04 2010

[Linux, PHP] PHP script to backup all databases

Category: Articles,Linux administration,PHPFractalizeR @ 1:20 am


I’d like to share my script, which I use on some production servers for quick database backup using mysql tools. People say, that I should use bash for that, but I prefer PHP 🙂

Script uses mysqldump for dumping databases and gzip for compressing backups. rm is run to ensure backups are not stored for too long.

Continue reading “[Linux, PHP] PHP script to backup all databases”

Tags: , , ,