google chrome extension „screen capture“

Chrome extensions you shouldn’t miss, today: SCREEN CAPTURE
The extension „screen capture“ is a perfect tool for easy browser screenshots. You can use it to capture the visible content of a tab, a certain selected region of a web page, or the whole page as a png image.

It’s also possible to edit your captured image before saving it as an image. Highlighting, even redacting and adding text are supported. Click here for more details and installing screen capture

chrome extension "screen capture"

chrome extension "screen capture"

calculate with spotlight

If you’re using a mac and os x you’ll probaly love spotlight search (use cmd+space to bring it on).
What you maybe did not recocognized is the fact spotlight can even calculate für you. A few examples:

calculate with spotlight 1

calculate with spotlight 1

Simply use the well known operators + (plus), (minus), * (multiplication) and / (division)

calculate with spotlight 2

calculate with spotlight 2

Furthermore you can calculate radicals by typing sqrt()

calculate with spotlight 3

calculate with spotlight 3

Your mac even knows pi.

cfc calling in browsers

If you ever asked yourself how to take a quick look inside a coldfusion cfc directly in a browser, check this out. If your cfc is in the webroot you can call it of course in a browser as usual:

http://www.domain.com/path/example.cfc

If you call a cfc this way the „cfc explorer“ appeares on stage and shows you auto-generated documentation of the cfc.
Additonally you can invoke a function directly in a browser:

http://www.domain.com/example.cfc?method=examplefunction

A request like this will actually invoke the method specified as url-parameter „method“.
Take care: the cffunction access-attribute must be specified as remote.

using exiftool for manipulating image-, audio- and video-file metadata (ubuntu)

What’s this post about?
exiftool is a perl module with additional commandline support for reading, writing, editing oder removing meta-informations in images, audio- or video-files.

Installation
you need the package „libimage-exiftool-perl“, easy to install using apt-get

[sourcecode language=“bash“]
sudo apt-get install libimage-exiftool-perl
[/sourcecode]

General Syntax
you can use exiftool with the following syntax:

[sourcecode language=“bash“]
exiftool [options] filename.ext
[/sourcecode]

print width and height
with the following command you can see the dimensions for all jpg-images in a directory

[sourcecode language=“bash“]
exiftool -p ‚$Filename $ImageSize‘ *.jpg
[/sourcecode]

deleting metainformations
with the following command you can remove metadata from every jpg-file in a directory. exiftool will make backup-files for you (filename.jpg_original) automatically.

[sourcecode language=“bash“]
exiftool -all= *.jpg
[/sourcecode]

extracting a thumbnail from the image
with the following command you can extract a thumbnail from a jpg-file:

[sourcecode language=“bash“]
exiftool -b -ThumbnailImage filename.ext > thumbnailname.jpg
[/sourcecode]

extracting a preview-image from the image
with the following command you can extract a preview-image from a jpg-file:

[sourcecode language=“bash“]
exiftool -b -PreviewImage filename.ext > thumbnailname.jpg
[/sourcecode]

changing the dpi-resolution
with the following command you can change the dpi-resolution jpg-files in a directory (lossless change):

[sourcecode language=“bash“]
exiftool -Xresolution=150 -Yresolution=150 -ResolutionUnit=inches *.jpg
[/sourcecode]

seo: domain redirecting with htaccess and apache mod_rewrite (domain with or without www)

Because of SEO regarding the duplicate content problem one of the basic rules is „don’t offer your same content on different urls“. Because of that reason it’s generally recommendable to use permantent redirects from http://example.com(/xyz…) to http://www.example.com(/xyz…)
This task is easy to implement, for example you could use a rewrite rule in your htaccess-file. Here’s an example:

[sourcecode language=“bash“]
RewriteEngine on
#Rewrite Rule something -> www
RewriteEngine On
RewriteCond %{HTTP_HOST} ^example.com$ [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L]
[/sourcecode]

Using this rule every single url from your domain requested without www. will be redirected to the same url with www.