Jun 18

Quick tip – Optimize PNG and JPG via a linux shell

For WordPress there are quite a few decent plugins to optimize images everytime you upload one ( I like EWWW ). But what about your old ones, and the ones that come via your theme and somebody forgot to do this?

Fortunately it’s quite easy to optimize images. These commands you can use to recursively batch process a whole directory structure. Just wait, and done.

find ./ -name '*.png' -print0 | xargs -0 optipng -clobber -preserve -nc -nb -o7

Optipng is for PNG images. Make sure it’s installed on your computer. The extra options are for preserving the permissions, overwriting and using quite some processing to come to the best optimization. You can alter the options.

If you want to use a different directory change the ./ (current) to something else.

For JPG’s :

find ./ -name '*.jpg' -print0 | xargs -0 jpegoptim -p -t -o

Aug 13

Skype : No notification sounds on Linux / Ubuntu

Today I want to share a short hint on using Skype under Linux which cost me some time to discover. I was having audio when calling but the notifications somehow didn’t work. Which is annoying when being ‘Away from Keyboard’ but expecting some calls.

Continue reading →

May 13

How-to clean CSS stylesheets fast

Just another quick tip but might be useful for you, lazy web developers, out there. Recently I needed to clean CSS stylesheets for one of my projects which has a theme from years ago ( 2007 or 2008 ) and needless to say many changes where done since.

I didn’t want to manually try half of the selectors and see if it would change anything somehow so I started to look for some online tools to do this tasks. There are quite a few but in the end I went for a Firebug extension called ‘ Dust-me selectors‘.

The way it works is quite inventive. Instead of trying to scan and parse your pages you can simply select ‘scan’ and click around your site. Every selector encountered is listed as ‘used’ so in the end you end up with a list of unused selectors which you can export to another file.

If you have a very polluted stylesheet you can just replace to old one (backup!) with the new one and start working from there by deleting the UNUSED tags Dust Me creates and rebuilding whatever needed to be done anyway. In my case I just a diff tool to just for differences and work my way through the stylesheet in this matter.

Hint: If you are scanning your pages be sure to click through every possible page. Especially unfolding menu’s and selectors like a:hover, a:visited are sometimes ‘forgotten’ while being in use.


Dust-me selectors is not a magic stick which will output very clean CSS just by the click of a button but is a very useful tool to help you in cleaning CSS stylesheets in an organized way.

Mar 13

Fotoxx : The IrFanView of Linux?

For years I have been telling people that using Linux is great for almost everything, except for quickly editing and uploading a bunch of photos. I have tried many many image programs (Krita, Gtumb, F-spot, Ristretto, ImageMagick, Gimp etc etc) and while a lot of them are useful for lot’s of things I yet had to find anything close to IrfanView on Windows. My usual method is selecting a picture from the gallery, then crop, resize, sharpen and save the image somewhere else for uploading.

Often I used IrfanView on Wine, but of course that is also suboptimal and not really comfortable. Even apart from some quirks that Wine seems to introduce. Gimp always seems to be a bit ‘too much’ when just wanting to quickly edit a bunch of photos.

Today I ran into Fotoxx ( which sounds a little weird ) by accident and I was happily surprised by the amount of features it has while keeping stuff simple. The interface is clunky and takes some time to get used to. Hopefully this will be a matter of attention in future versions to come.


Features include everything I need for daily life like crop ( called ‘trim’ ), resizing, sharpen and everything else you might except from fast, simple photo editing software. There is also a gallery which does what it needs to do, but also suffers from bad design decisions ( like single-click map navigating, why? ).


Another good thing is that Fotoxx comes with a lot of batch-filter options, in case you need to transform a whole bunch of images. I didn’t look at this closely but might come in handy if you are stuck with a use load of similar photo editing you have to do.

Concluding, I don’t think it’s a perfect solution yet but it certainly is much better than what I have seen so far. In some ironic way it looks like IrFanView since the latter’s interface is also far from being perfect. Be aware of very old versions that some distributions still seem to carry by default. You can get the latest packages here.

If you are aware of better solutions for a good Linux image editor share it in the comments!

Jan 13

Regular expressions – test online

I have been fiddling around with Regular Expressions these days. As most people who ever tried it know that you can do about anything but it is at the same time nearly impossible.

Instead of making a test page, altering and refreshing minor changes all day I decided to look around a bit for a handy tool. There are a lot of them out there but I found a nice one.

The cool thing is you can easily switch between modes, modifiers and it automatically refreshed. The only minor point is that it is sometimes hard to see the difference between no match and an expression crash.

Check it out: Online regular expressions tester

Let me know if you found a better one!

Oct 12

Using SSHFS for quick updates

If your hosts supports SSH and you have the luck to run your desktop on a linux-based computer there is a quick way to do updates to your site.

SSHFS allows you to use mount a SSH-connection just like you would mount other filesystems. The benefit of this is when, for instance, you need to copy a small amount of files you can do this as a local file operation.

Some might grumble by the idea and of course in a professional production environment ( or large updates ) I would not recommend this. And directly updating (or doing untested stuff) on production systems needs to be grumbled upon in my view.

I use SSH often for small configuration settings or when I need to do small maintenance. SSHFS just give me for these minutes some extra flexibility!