How to use OptiPNG recursively

Few hours ago I wrote about image optimization with Jpegoptim. Now I'll write few words about Optipng, a PNG and GIF optimizer. 

OptiPNG is a PNG optimizer that re-compresses image files to a smaller size, without losing any information. This program also converts external formats (BMP, GIF, PNM and TIFF) to optimized PNG, and performs PNG integrity checks and corrections. If you wish to learn how PNG optimization works, or to know about other similar tools, see the PNG-Tech article A guide to PNG optimization.

How to use Jpegoptim recursively

Jpegoptim is a Linux software that does what the name suggests: is does optimize jpg images. It is one of the two recommended software for Google Pagespeed optimization.

As this software doesn't have a recursion parameter, we use a trick to parse all the subdirectories where we have jpeg images to be optimized.

Chmod files and directories recursively

Chmod directories recursively: find . -type d -exec chmod 755 {} \;

Chmod files recursively: find . -type f -exec chmod 644 {} \;

Fix for error: malformed header from script. Bad header=<br /> - PHP 5.4

Suceava in 2 minutes and a half - fugiti tare cand auziti numele asta

Daca vreodata v-ati gandit sa va gazduiti site-ul la Hostmama, mai ganditi-va o data. Pretul mic al serviciilor oferite vine cu un cost mare; mult prea mare!

Eu am luat de la ei un pachet Cloud Hosting (CLOUD4) la pretul de 60 euro / luna + licenta cPanel, la inca 12 euro / luna. Total: 72 euro. Ei nu percep TVA, ceea ce e OK pentru mine, ca neplatitor de TVA.

New workplace!

Plus TV Suceava

I'm so excited now that I got a job, something I enjoy doing so much!

Plus TV station, in my hometown almost hired me as a TV camera operator. Almost, because now I'm in sort of a trial.

Now I can say I'm happy to combine work and pleasure.

Fix for "Fatal error: Call to undefined function drupal_check_memory_limit()"

After a Drupal upgrade, I got this: Fatal error: Call to undefined function drupal_check_memory_limit() in full_path/modules/system/system.install on line 206.

This is mainly because the update was incomplete. You should update includes directory as well, after updating the core module files.

What CMS are you using?

Disable Spell Checker in CKeditor 3.3.1 (Drupal)

CKeditor interface

Have you ever wanted to completely disable spell check function in CKeditor?

Well, after searching few hours for a solution, I ended up modifying the main plugin file, ckeditor.js, located in the CKeditor root folder (in my case, sites/all/libraries/ckeditor).

By default, this file is minified. If you try to beautify it, it might not work at all, so leave it minified.

Now, look after this string:


Subscribe to Marius Carneala RSS


Samples of work done for me or my customers, for free or not, like websites, repairs, photography etc.
View all my recent work



I'm giving away some knowledge in my areas of expertise. Did you like something here? Share it please!
View all tutorials



Useful Linux commands or other code snippets I often use.
View my useful shortcuts



Few bookmarks I find useful. Do you want website here? Give me a good reason and I can help you.
View my favourite web resources

About me

Hi there! My name is Marius Cârneală.

About me?

Loving husband, dad of one two three, drone pilot, web designer and administrator, SEO specialist, IT support guy, electronic hobbyist and content writer. This list is open.