Applescript to Duplicate Terminal Tab

From my personal experience, I realized that I’d always need at least two terminal tabs whenever I do any Rails development: one to run the server ($ ./script/server) and one to do the rest of the rails stuff (generate things, run rake, etc). Pressing Cmd-t in Terminal will open a new tab, but that new tab would always start at my home directory.

Now I can first navigate to the folder I wanted to got to in Terminal, then this script will open a new tab in the foremost window of Terminal, then “cd” into the directory of the previous tab.

tell application "Terminal"
    activate
    tell front window
        set cur_path to do script "osascript \
            -e 'tell application \"Terminal\"' \
            -e 'tell application \"System Events\" \
            to tell process \"Terminal\" to \
            keystroke \"t\" using command down' \
            -e \"do script with \
            command \\\"cd `pwd`;clear\\\" \
            in selected tab of the front window\" \
            -e 'end tell'" in selected tab
    end tell
end tell

Defeat Annoying “Open Link in New Window” in Safari

I am absolutely sick of link that opens in a new window and the new Safari 3 has just the solution — “Merge All Windows” — anytime there are more than one window of Safari open, just select from the menu:

Window -> Merge All Windows

Safari will consolidate all open windows into tabs in just one window. To execute this even faster, create a keyboard shortcut:

Cmd-? Still Works on OSX!!

I was just browsing the Flickr set for the Apple //c unboxing I noticed at the bottom of this photo:

… it says Cmd-? for Help. Since I never used to access the help files on OSX, I was surprised to see Cmd-? still works and activated the help files.

Fixed: Finder Preview Column Icon Always Closed by Default

I don’t know if anyone else run into this but for me the problem is that the large icon view in Finder’s Preview Column would always be closed by default. Whenever I select a file in Finder, the Preview Column would look like this:

Which is very annoying. After some googling and finding no solutions online, and trying various customization apps (Onyx, MacPilot, etc.) with no veil, I thought there must be something in the Finder’s preference file. And sure enough there is. In the Finder’s preference file, under:

Root -> StandardViewOptions -> ColumnViewOptions

There is a boolean entry called PreviewDisclosureState and its value was No. After I changed its vale to Yes, the large icon preview in Finder’s Preview Column is back again!

LOL ~~~ Be Afraid, Be VERY Afraid ~~~

The second generation of the Tank Chair is even bigger and badder than the original, with a 24v, 2hp, 127rpm variable speed motor powered by four Optima Deep Cycle batteries. It also has a 22:1 gear ratio and it can handle a 10% incline with no problems. Gizmodo

Dept. of Dude …: Bumblebee spotted on CES floor

From Engadget