@apple4us typical "wolf's coming" for the gov has done 2 much evil. Hard 2 believe not related 2 them. Haha.

Turn off MacBook LCD when lid is open while connecting to external display in OS X Lion

September 14th, 2011 by Tkjune

MacBook And Cinema Display

I guess you know what I’m talking about. Let’s go to the solution directly first:
Go to Terminal and input the command as follows, press Enter, input password as needed.

sudo nvram boot-args="iog=0x0"

Restart and try it out!
When you want to get back to Lion’s default state, use this command:

sudo nvram -d boot-args

If experiencing problem when restart, restart again and press ⌘, ⌥, P, R together to reset PRAM. (Not sure how to fix this yet, as I guess, it works only for Nvidia video card? Check your MacBook’s specification.)

And here’s why we are doing this:

I found a lot of people have the same habit as me that, we don't want extended desktop because the mouse always travels to some places that hard to find or something like that. So we connect external display to MacBook, close the lid to put system to sleep, then activate display by external mouse or keyboard, then open the lid to keep the MacBook cool. In Snow Leopard age, doing such a thing, the MacBook's LCD won’t wake up when you open the lid. But in Lion, it will turn on automatically.

Fortunately, we can always do some tricks in Terminal like before. Thanks to chenga.8@hengdm, @hello_kukoo, @apple4us to provide the useful tip.

jitouch, the Solution for Multi-touch Gestures of OS X Lion

August 31st, 2011 by Tkjune

 

jitouch

A lot of people find that backward/forward multi-touch gestures in Snow Leopard for Finder, iTunes, web browser like Chrome/Firefox, are not available any more in Lion. I wrote a solution for that in July. Later in August, the solution is not working due to the update of 10.7.1.

MagicPrefs is the software I recommended before, which is free, and gives so many gesture functions for trackpad, Magic Mouse. A few days ago I found another software, jitouch, which shows you the new definition of Multi-touch Gesture. It presents dozens of new gestures that you can define for dozens of functions.

Firstly, solve the backward/forward problem.

I know this is what you came here for. Please follow me, we take MacBook built-in trackpad as example:

  1. Download jitouch here and install it.
  2. Go to System Preferences - Trackpad. In tab Point & Click, uncheck the box “Three finger drag”. Maybe you would like this on. But it may cause some mis-selecting text in backward/forward action, you can take a try later. Your choice.
  3. In tab More Gestures, make sure Swipe between full-screen apps is with the option Scroll left or right with FOUR fingers. It ensures that swipe with 3 fingers gesture is not occupied by system.
  4. You can find jitouch setting in the bottom Other group of System Preferences. Click into it. In Trackpad tab, make sure Enable jitouch for Trackpad is checked. In the list box below, find out Three-Swipe-Left/Right. If there’s no, click “+” button to add it. Relate it to Keyboard Shortcut: CMD+[ (for Left)  and CMD+] (for Right) and save it.
  5. Make sure there’s no conflict between system and jitouch setting.
  6. Open Finder, iTunes, Chrome... and take a try!

Ok, why jitouch?

I feel, compare to MagicPrefs, the sensitivity of jitouch is more accurate. You can see a * . Meanwhile, MagicPrefs could do the same thing and MagicPrefs is FREE! Still, your choice.

And any other tips?

  • Don’t make yourself confused by adding too many gestures. Even if you can remember, if you are using different computers in company and at home, relying on so many convenient functions makes u suffer in the other place (esp. Windows. In the mean time, I say, Go Geeks, Go! :D ).
  • The gestures of “n-Fix other-Tab” in jitouch is brilliant, default setting of “Previous Tab / Next Tab” etc. is quite handy. Don’t waste it.
  • Cheers for keeping the “Smooth History (Official name: Swipe to navigate)” of Safari (maybe in some other apps too? I’m not sure yet) and “backward/forward” of Chrome together. Yeah!

ColorSync Profile for Dell U2410 on MacBook Pro

August 17th, 2011 by Tkjune

Change ColorSync Profile
Dell U2410 is a great monitor in 24 inches, with vivid color, convenient UI. When using it with my Macbook Pro, I found it too bright and the default color setting is not so good. I adjusted the color in comparison of MacBook Pro's own LCD. And here is the Dell U2410 ColorSync Profile for MacBook Pro. Follow the steps below you may feel better with your U2410's color.

  1. Download and unzip the file to /Library/ColorSync/Profiles/Displays (change the unzipped filename if you want).
  2. Press the menu button on U2410 and change the settings to:
    Brightness - 70
    Contrast - 100
    Color Settings - Input Color Format - RGB; Gamma - MAC; Mode Selection - Graphics; Preset Modes - Adobe RGB
    Display Settings - Sharpness - 50
    (BTW, I'm using miniDisplay->DVI adapter to connect to U2410)
  3. Go to System Preferences -> Displays. In Dell U2410 window, choose "Color" tab, you may find "Dell U2410 (tkjune)" in the left list. Click it.

The color of your monitor should now change. Is that okay? If not, you still have to "Calibrate..." by yourself. Don't worry it's quite easy with the guide of Apple Display Calibrator Assistant. Only that you may have to do it several times to find out your favorite mode. Tips for you: Open same application window, same photo in both monitors and calibrate step by step. To make the U2410's color exact same with MacBook Pro's LCD, you win.

Disable update checking of WordPress 3

August 14th, 2011 by Tkjune

WordPress Update Check
When you designing a website for client with WordPress, you may not want your client click the "Upgrade" button for any reasons (mostly, by curiosity). We all know that it may cause unusable of customized theme. Here's how to disable it. Open functions.php of your theme and add following lines.

  1. add_filter('pre_site_transient_update_core', create_function('$a', "return null;")); // screening core update
  2. add_filter('pre_site_transient_update_plugins', create_function('$a', "return null;")); // screening plugin update
  3. add_filter('pre_site_transient_update_themes', create_function('$a', "return null;")); // screening theme update

Or

  1. remove_action('admin_init', '_maybe_update_core'); // forbid wp_version_check();
  2. remove_action('admin_init', '_maybe_update_plugins'); // forbid wp_update_plugins();
  3. remove_action('admin_init', '_maybe_update_themes'); // forbid wp_update_themes();

The second method is recommended that it removes the function in grain.

Disable window pop up animation in Mac OS X Lion

July 28th, 2011 by Tkjune

Fully agreed with some reviews of Mac OS X Lion that, pop up window animation is quite annoying. Luckily it also provides a way to disable it with Terminal.

In Terminal, paste command below and press enter:

defaults write NSGlobalDomain NSAutomaticWindowAnimationsEnabled -bool NO

UPDATE on Aug 13,2011: Try Lion Tweaks to make it more easier. You can change many other hidden settings with it too.

Pop up window animation in Lion

Using magic mouse 2 fingers swipe in Chrome/Firefox in Lion

July 5th, 2011 by Tkjune

UPDATE on Sep 15th:

If you don't want to use any other 3rd party software, it still can be done. Take Trackpad as example: Keep the default setting no change (2 fingers for Safari smooth history, 3 fingers for full screen app switch), when going forward or backward in Chrome or Firefox etc., press ALT(OPTION) key while swiping with 3 fingers. Thanks to Alejandro to provide the useful tip!

UPDATE on Aug 31st:

jitouch, the Solution for Multi-touch Gestures of OS X Lion

IMPORTANT UPDATE on Aug 21st:

After upgrading to 10.7.1, solution below does not work anymore. If you want forward/backward back, try using MagicPrefs. I'm testing. Again, you cannot use 2 fingers swipe of Trackpad (1 finger for Magic Mouse) go back and forth in Chrome, Finder, iTunes, Firefox and so on in 10.7.1 without help of 3rd party software's help.

Just upgraded to Mac OS X Lion. A lot of new features come with some habits you may have to change. For example, the smooth browsing backward/forward experience in Safari together with no functioning of magic mouse's 2 fingers swipe for backward/forward in Chrome/Firefox or other web browser or applications.

You may have same habit with me, on using magic mouse:

  • Use 1 finger to scroll around (few webpages scrolls left to right, but they exist)
  • Use 2 fingers to go backward/forward
  • The 2 habits above apply to all browsers Safari, Chrome, Firefox and Opera, etc. Oh, and Finder.
  • Some other applications may need this too, like in Sparrow, to fold and unfold a mail

When upgrading to Lion, something changed as follows by default:

  • Use 1 finger to go backward/forward in Safari. (Yes, it's moving smoothly, nicely, elegantly...)
  • Use 2 fingers to move to different desktop in "Mission Control"
  • Cannot go backward/forward in other favorite browsers. Oh, and Finder.
  • Cannot fold/unfold a mail in Sparrow either.

And here's the solution(with which, you need to give up something):

  1. Open Magic Mouse setting in System Preferences
  2. In More Gestures tap, click the drop down list under Swipe between pages and choose Swipe left or right with two fingers
  3. Uncheck the Swipe between full-screen apps

Now you get your old 2 fingers gesture for magic mouse back, and you give up smooth moving backward/forward in Safari -- you can still move backward/forward in Safari, just not smoothly.

Wait a minute, how about the "Swipe between full-screen apps"? If you really need that and don't mind to use 3 fingers to swipe for this, you can use MagicPrefs, which provides you so many different actions for Magic Mouse, Magic Trackpad, Macbook Trackpad. You can define a 3 fingers swipe gesture to "Switch Space Left/Right", and it's free, Hallelujah!

For smoothing moving backward/forward in Safari, if only one finger swipe can be applied to it, I have to give it up. One reason is as above, the other is, it may cause some mis-action when browsing. Hope apple could give a update for magic mouse 2 fingers gesture later.

Switching to no-www

June 11th, 2011 by Tkjune

It's said that without "www." in url could be "google friendly" or better for SEO. For me, the reason is "too long". So I decided to switch to no-www. The url redirect works well. Now I'm concerning if the RSS feed subscription would be ok. This the test post for it.

URL Rewriting for WordPress in IIS with wp_url_rewriting and patch

May 5th, 2011 by Tkjune

There are several ways to use URL rewriting for WordPress in IIS. I'm using wp_url_rewriting for my client. Recently, my client upgraded his WordPress to 3.1 which cause a problem that the page navigation does not work correctly.

Symptom: The page link in a category page, does not contain the category slug. Ex. in http://sampledomain/samplecate/, the page link should be http://sampledomain/samplecate/page/2, but it shows like http://sampledomain/page/2.

This does not happen on my Apache server. So I checked out wp_url_rewriting installation note and I found this:

3). Do a little hack to WordPress file ‘link-template.php’ to make paging works well for categories:(NOTE: You don’t need to do this step if you are using WordPress 2.3.0 or newer)

open file /wp-includes/link-template.php and find the following code:....

From 2.3.0 to 3.0.x, no need to do the hack. Since 3.1.0, it becomes a must again. The original hack does not working. It's been moved to another file. So do the hack as follows:

open file /wp-includes/functions.php and find following code:

  1. function add_query_arg() {
  2. $ret = '';
  3. if ( is_array( func_get_arg(0) ) ) {
  4. if ( @func_num_args() < 2 || false === @func_get_arg( 1 ) )
  5. $uri = $_SERVER['REQUEST_URI'];
  6. else
  7. $uri = @func_get_arg( 1 );
  8. } else {
  9. if ( @func_num_args() < 3 || false === @func_get_arg( 2 ) )
  10. $uri = $_SERVER['REQUEST_URI'];
  11. else
  12. $uri = @func_get_arg( 2 );
  13. }

Replace the $_SERVER['REQUEST_URI'] with $_SERVER['PATH_INFO']

Then wp_url_rewriting will work again.

BTW, after fixing this, I found some updates of ISAPI_Rewrite. The lite version could work well for WordPress. I used that before. I remember there were some limitations for the lite version. Since this article was written on Feb 17th, 2010. I guess it should work fine. If so, this could be a better solution for there's no hack needed.

 

Mac OS X hotkey table for print

March 6th, 2011 by Tkjune

It's so convenient to use Mac when making full use of hotkeys. I found the most used hotkeys list and made a table, which can be printed on 2 pages of A3 paper. It can be the quick reference for Mac newbies.

Click images below to zoom and save.

Mac hotkey table page 1

Mac hotkey table page 2

iriver Cover Story is revealed

August 7th, 2010 by Tkjune

iriver Cover Story

iriver recently revealed the new ebook product, Cover Story. It's a wonderful and exact name. 'Coz this time the Story comes with a cover to protect the screen.

I got a real one in hand. It feels, especially the paging key on the left. As it shows on the photo, the long bar on the left is the paging key. It also takes the responsibility of going back to previous function view and going back home by clicking the bottom or top of it. There is a menu key on the top side of Cover Story and a power key at the bottom. Volume +/- key is placed on the left side of it. The best design should be the cover. If you think the cover is not convenient to take along, you are wrong. It can be attached to the backside with by magnetism. The long hole on the cover just leaves the speaker on the back of Cover Story in the air.

Touch screen, G-sensor, is the new feature. With G-sensor, you can use left or right hand to handle the ebook based on your habit. Memo function is enhanced too. Set the auto memo function to on, when you draw the stylus pen out, the meme pad pops up and is ready to draw any thing on.

Compare with Story I tried before, the Cover Story feels like lighter, which in fact is not true. But it's really very handy. Though iPad catches most people's eyes, this kind of ebook product is still attractive. Reasons?

  • Lighter, smaller, handy
  • Eye-protected e-ink screen
  • Long battery life
  • Cheaper

I would consider it if it's under $350.