Debugging Zend Framework routes with ZF Debug Utils

Debugging Zend Framework 2 routes and specifically why a given route wouldn't match to a controller was one of my pains while working with ZF2 applications. After spending too much time debugging them I decided to put together a ZF2 module - Noiselabs\ZfDebugModule - to help me visualize what…

Ghost, Dockerized.

In this blogpost we'll see how to Dockerize a local Ghost app for fun and profit. In a rush? Already familiar with Ghost? Jump to the technical bits. Posting, again It's been a *looong* time since my last post. The time has come to break the silence and start posting…

Introducing SmartyBundle, a Smarty3 bundle for Symfony2

Hello all! I've released yesterday the first version of SmartyBundle on GitHub. SmartyBundle SmartyBundle is a Symfony2  bundle that provides integration for the Smarty3 template engine. It will allow the usage of the Smarty template engine in Symfony2, instead of Twig or PHP templates. SmartyBundle is released under a LPGLv3…

Failed to submit batch buffer (Xorg)

Another Xorg update After my last Xorg update I've lost the nice ability to log into my KDE. Well, this sucks because I spent a long time compiling kdelibs and friends so I really want to use it. Symptoms A blank screen on login. You can even see your mouse…

Sanitize filenames with PHP

PDF generation and invalid characters While working with the TableTools PDF generator included in the great DataTables jQuery plugin I've noticed that sometimes the script failed to generate the PDF file. The cause? Invalid characters in the filename. Well, to solve this issue I've made a simple PHP function to…

Don't let updatedb take your Linux down

Coffee break everyone? Everyday morning was the same: updatedb came and took my Gentoo away. The symptoms were clear, X/KDE applications starting to become slow and unresponsive, and then the two inevitable choices: go for a coffee and wait or pkill the bastard. Asking updatedb to be nice (the…

Meme Miner: the translation tool I've been looking for

No, this will not replace Google Translate or Babel Fish. But it does something that these tools simply can't offer. For some time I've been using Wikipedia to translate expressions that a normal translator couldn't give exact results, because they use literal translations. Now there is a faster way. Enter…

Ebuild for CoovaChilli v1.2.2 coming soon

It has been a while since I took Laurento Fritella contributions on bugzilla for CoovaChilli-1.0.11 and made them available through Sunrise overlay. In the meantime I've tried to submit version 1.0.14 but run into some problems with SSL and I was back then completely out of…

tar: file name is too long (max 99)

I was doing the usual make dist process to launch a tarball for one of my apps when tar died with the following message: tar: file name is too long (max 99); not dumped tar: Error exit delayed from previous errors If you happen to see the same error message…

Chromium OS using Portage build environment

These are good news for the Gentoo community. Portage is being used to build Chromium OS packages. As you may know, Portage is the Gentoo Linux default package management system which has its roots on FreeBSD's ports. As of February 5, Google developer Ryan Cairns has made this statement on…

Mark all messages as Read in Gmail (in 3 easy steps)

Want to get rid of all those unread messages in Gmail? Or, just like me, have some unread messages you can't find and want to reset the unread count to zero? Well, here is the solution: Type "is:unread" in the search bar. Then select "Unread"…

Check UTF-8 input in PHP: only letters

This is a simple way to check a UTF-8 string with PHP function preg_match in search for anything that isn't a letter, which includes all UTF-8 letters and not just ASCII. Preg_match performs a regular match on the given input using a pattern. The pattern used tells preg_…

How to prevent caching (force image reload) in PHP and/or JavaScript/jQuery

If you are using images generated on-the-fly by a PHP script (or another server language), like I'm doing on my web application, you surely do not want images to be read from cache as your users will be seeing the same first generated image (saved into cache) and not the…

Howto Gentoo Linux with UTF-8 and Portuguese (Portugal) localization

Purpose How to configure a Gentoo Linux system to use UTF-8 character encoding and Portuguese (Portugal) localization (language and keyboard). Background UTF-8 is a variable-length character encoding, which in this instance means that it uses 1 to 4 bytes per symbol. So, the first UTF-8 byte is used for encoding…

Resume wget broken downloads

Problem How to resume a partial file downloaded from wget instead of downloading the same file from the beginning? Solution Use the -c/--continue option of wget From man wget: "Continue getting a partially-downloaded file. This is useful when you want to finish up a download started by a…