Tuesday, May 27, 2008

Sold on Firefox - Zoom In Just Gets Better

Two pictures worth a thousand words.

Web pages in Firefox after zoom in



Web pages in Safari after zoom in



That's right. Firefox not only increases the font size, it increases the size of everything proportionally.

Tuesday, May 13, 2008

Plain text in Mail.app by default

I generally prefer plain text when writing emails. However, in the place where I work, a lot of people use Microsoft Outlook or its web version. By default, it sends out emails in HTML. Even worse is the fact that the font size in those emails is too small. To reformat all incoming email and display them as plain text, quit Mail.app, type
# defaults write com.apple.mail PreferPlainText -bool TRUE
Relaunch Mail.app and enjoy.

To revert back, use
# defaults delete com.apple.mail PreferPlainText

Thursday, May 1, 2008

find

One thing about sharing files between Windows and Mac via a USB is that the USB has to be formated in fat32. Then all the files copied from Windows will have the file mode x enabled. Manually removing it for each file is very cumbersome because for directories you do want to keep the x mode. This can be done easily using find
# find . ! -type d -exec chmod -x {} \;
Another example is
# find . ! -type d -exec xattr -d com.apple.quarantine {} \;

Monday, April 21, 2008

Bluetooth unavailable? Reset SMC!

I don't know when did this happen: bluetooth in my MacBook suddenly becomes unavailable. System profile shows me no bluetooth device is detected. Just last week I transfered some photos from my cell phone to my MacBook, and now this?

After some googling, I found the solution: Reset the SMC unit. OK, unplug the AC adapter, remove the battery, hold on the power button, and 5 seconds later, my bluetooth is back.

My friend il actually had another problem with his MacBook: iSight no longer works. Guess what he did...... Reset SMC!

What else CANNOT be fixed by resetting SMC?

Sunday, April 20, 2008

Play rmvb format using MPlayer

MPlayer is my favorite media player on Mac OS X. I really don't understand the great disparity in terms of user numbers between VLC and MPlayer, as shown on osx.iusethis.com. In my experience, MPlayer plays more formats than VLC does and has better subtitle support. I don't mean to diminish VLC but I think at least these two players should be similar in every aspect.

In any case, both MPlayer and VLC are way better than the bloated RealOne player. However, sometimes I need play rmvb file but it is not supported by MPlayer out of box. In this case, first download RealOne, then copy all the bundles in
RealPlayer.app/Contents/Frameworks/HXClientKit.framework/HelixPlugins/Codecs
to
/usr/local/lib/codecs
If you don't have the second folder then create it first.

Oh, don't forget to delete RealOne afterwards.

Friday, April 18, 2008

Tips on ssh

1. Use ssh-keygen to generate key pairs
# ssh-keygen -t rsa -b 2048
ssh-keygen can generate both RSA and DSA keys. While you can specify any key length for RSA keys (in the example it is set to 2048 bits), the key length for DSA is always 1024 bits as required by the government. RSA is also faster when it comes to verify the key.

After ssh-keygen generates the key pair, put id_rsa.pub to ~/.ssh/ on the remote machine and rename it to authorized_keys.

Now enjoy remote login without having to input your password. (Of course you have to make sure the physical access to your machine is secured.)

2. Use ssh_config to specify ssh setting

You can put the configuration into the file ~/.ssh/config. Below is an example
Host short
HostName long.server.name
User name
Then you only need input
# ssh short
instead of
# ssh name@long.server.name
For more options, man ssh_config.

Saturday, April 12, 2008

A 'Perfect' iTunes Equalizer Setting

I recently came across this post on MacOSXHints.com. The modified equalizer sounds amazing. Simply copy the applescript below and run it in script editor
tell application "iTunes"
tell EQ preset 1 -- the Manual setting which you can then save
set band 1 to -8
set band 2 to -5
set band 3 to -3
set band 4 to -4
set band 5 to -5
set band 6 to -6
set band 7 to -4
set band 8 to -2
set band 9 to 0
set band 10 to -3
set preamp to 6
end tell
end tell

This is how it looks.

Save the preset and enjoy!