Archive for the ‘mac’ Category.

Show hidden files in Finder

To display hidden files in Finder type the following commands in the Terminal:

$ defaults write com.apple.finder AppleShowAllFiles TRUE
$ killall Finder

Snow Leopard (Mac OSX 10.6) is here

mac106buena Snow Leopard (Mac OSX 10.6) is here

Mac OSX Preview, merge, crop, delete, add blank PDF pages

To merge and/or remove PDF pages we need the sidebar so press the sidebar button (see first figure). You can switch from thumbnails to table of contents from the button located at the bottom right corner (see second figure).

preview1 Mac OSX Preview, merge, crop, delete, add blank PDF pages

preview2 Mac OSX Preview, merge, crop, delete, add blank PDF pages

Merge PDFs.

Open the first PDF and then just drag & drop the second PDF to the sidebar, between the pages where you want it to appear (see figure).

preview3 Mac OSX Preview, merge, crop, delete, add blank PDF pages

Delete a page.

Select the page you want to delete (in the sidebar) and type Command (The key with an apple) + Backspace.

Add a blank page.

Select Edit -> Insert Blank Page.

Crop an image or file.

First click the select tool. Then select an area of your document or image and hit Command + k.
preview4 Mac OSX Preview, merge, crop, delete, add blank PDF pages

Now you can save the cropped page or image with Command + s.

preview5 Mac OSX Preview, merge, crop, delete, add blank PDF pages


Visual Studio Doxygen Latex and encoding problems

Today I tried to extract documentation from source code programmed in Visual Studio using doxygen. The Latex document didn’t compile correctly because of encoding problems. Googling for a solution I’ve discovered that Visual Studio may include some strange characters in the saved files.

To fix the files I’d recommend using an Hexadecimal Editor. In my case I’ve chosen hexedit. Opening the file with Hexedit shows those unwanted characters at the beginning of the file. By removing them and saving the file the problem with Latex disappeared. Hope it helps in case someone runs into the same issue.

hex Visual Studio Doxygen Latex and encoding problems

Opening files from the command line on Mac OSX

If you need to open a file from the command line (e.g. a PDF file) you can use the open command:

open -a Preview filename.pdf

In general working from the console is fast and effective, specially if you combine it with bash scripting skills.

Save disk space on Mac OSX Leopard

Generally, Mac applications come with code for architectures you don’t need (e.g. PowerPC code) and with many languages you don’t use. Xslimmer removes these unneeded features, saving a great amount of disk space. In my case I’ve recovered 3GB, impressive huh?

xslimmer Save disk space on Mac OSX Leopard

Schedule commands to run later on Linux and Mac

For scheduling periodical tasks you have Cron. But if you just want to schedule a command to run later you can use at.

# at 12:00
# at> echo “Scheduled phrase”|mail addr@provider.com
# at> (type control+d)
job 6 scheduled at 2009-06-16 12:00

You can see the scheduled tasks with atq and remove them with atrm

# atq
6 2009-06-16 12:00 a root
# atrm 6 (where 6 is the task id)

Mac4lin brings the beauty of the Mac to the Linux desktop

Seen on Lifehacker. Two years ago I bought a Macbook and from that moment on, I’m pretty much in love with the Mac look & feel. Its ease of use and integration are impressive. Mac4lin brings these fancy features to the Linux Desktop. It includes skins, wallpapers and interface refinements that resemble the Mac experience. It definitely worths a try!

mac4lin Mac4lin brings the beauty of the Mac to the Linux desktop