Saturday, November 8, 2008

Find any file from terminal

Sometimes you need to find some system file or other that soptlight doesn't find. The solution is to write 2 simple lines in the terminal.

-> Open the Terminal App, inside Aplications - Utilities
-> Type: "sudo /usr/libexec/locate.updatedb" and press Enter. This will update the locate database.
-> Type: "locate '[the-name-of-the-file-or-directory]'" and press Enter.

Thursday, October 23, 2008

Show all/hidden files in the Finder

By default, you can't see many system files, dot files and folders in Finder, you only see them in the Terminal using de ls command.
If you need to see them, do this:

-> Open the Terminal App, inside Aplications - Utilities
-> Type: "defaults write AppleShowAllFiles YES" and press Enter
-> Restart the Finder App, press option + alt + esc
-> Select Finder
-> Press Force Quit

To hide again this system files and folders, repeat the process but type "defaults write AppleShowAllFiles NO" instead.

Thursday, May 29, 2008

Play ogg files in iTunes / QuickTime

If you want to play .ogg music e videos files in iTunes or QuickTime all you need to do is:
- Go to the xiph page (the creator of the extension) at
- Download the component
- Mount the file
- Copy the "XiphQT" file to "Macintosh HD/Library/Components" directory
And that's it. Now if you restart your iTunes or QuickTime Player you'll be able to play .ogg files.

Sunday, March 23, 2008

Enable .htaccess in Leopard

By default, in Leopard Apache, you can't use the .htaccess files.

The solution is to edit your .conf file and modify 2 lines:

-> Open Terminal App
-> Write "sudo pico /private/etc/apache2/httpd.conf"
-> Press ctrl + w
-> Type "AllowOverride" and press enter
-> Replace "AllowOverride none" for "AllowOverride All"
-> Press againg ctrl + w and then enter
-> Replace again "AllowOverride none" for "AllowOverride All"
-> Press ctrl + x
-> Type 'y'
-> Press enter
-> Type "apachectl graceful" and press enter
And it's done, you can close the Terminal and start using .htaccess files

Sunday, February 17, 2008

OS X 10.5 Leopard - User Lost Administrator privileges

Some days ago I had some updates available for my Leopard but couldn't install them as I was not
allowed to administer the computer for some unknown reason.
Apple says that it's an issue with Leopard 10.5 and tell you how to fix it with installation DVD and 9 steps, see the tutorial here:

I found another solution only based in command line, offered by macXORHacker:
Here is the fix.....
-> Shut down the computer if it is on.
-> Press the power button to start the computer.
-> Immediately press and hold the Command (Apple) key and the "s" key for single-user mode.
-> Type "mount -uw /" and press return.
-> Type "passwd" and press return.
-> Enter new password (this will be for the root user account) and press return.
-> Type "reboot" and press return.
-> Enter Account settings and when prompted for administrator account and password, use the user name root and the password you just setup
-> Check box for you standard account to administrate box
-> If all goes well you are admin again.
I will add to this, please DISABLE the root account after you do this, or at very least, use a good, strong password."

And that did the trick for me.

Saturday, February 16, 2008

Adding GD library for Mac OS X Leopard

Unfortunately the Mac OS Leopard PHP build doesn't bring GD library installed.
There are many tutorials around the web telling how to patch the system so you can have it working but all are very complicated and require the installation of Xcode, etc, so you need some gigs of free HD space and a lot of free time to do the trick.

After goggling for some hours searching the simplest tutorial, I have found this great solution that works like a charm and it's as simple and fast as write some commands in the terminal.
This tutorial tells you how to overwrite the system PHP installation with a new with GD built in.

So what you need to do is:
-> Open Terminal App
-> Write "sudo mv /usr/local/php5 ~/Desktop/php5.old" and press return
- You'll be asked for the admin login
-> Write "curl -O" and press return
-> Write "tar -xzf php5-*-beta.tar.gz" and press return
-> Write "sudo mv php5 /usr/local/" and press return
-> Write "sudo ln -sf /usr/local/php5/entropy-php.conf /etc/apache2/other/+entropy-php.conf" and press return
-> Write "sudo apachectl restart" and press return
- You're done :)


Sunday, January 6, 2008

Mighty Mouse scroll ball stopped working?

apple mighty mouse trackball
It happened to me once and I thought it was broken, but suddenly I found a simple solution:
-> Pick up a clean blank sheet of paper
-> Put the Apple Mighty Mouse upside down
-> Rool the trackball on the paper till it starts to work