Archive for the 'Mac' Category

Keyboard navigation for TextMate stacktraces

Jun 29 2008 Published by under Apple,English,Mac,OS X,Ruby,TextMate

Keyboard navigation for TextMate stacktraces

Put this script at the end of /Applications/TextMate.app/Contents/SharedSupport/Support/script/webpreview.js.

document.addEventListener('keypress', function(e){
    var key = e.keyCode
    if (key != 63233 && key != 63232) return
    links = document.getElementsByTagName('a')
    for (var i = 1; i < links.length; i++)
        if (links[i].title == 'focused') break
    if (i == links.length) i = 0
    links[i].title = null
    if (key == 63233){
        if (i == (links.length - 1)) i = 1
        else i += 1
    }
    if (key == 63232){
        if (i <= 1) i = links.length - 1
        else i -= 1
    }
    links[i].title = 'focused'
    links[i].focus()
})

Incredibly useful when I am running my tests!

No responses yet

Firefox Keyboard Shortcuts on Mac

Jun 25 2008 Published by under Apple,English,Mac,OS X,Software

Top Ten Firefox Keyboard Shortcuts

1. ⌘ + l = focus address bar
2. ⌘ + d = bookmark current page
3. ⌘ + k = focus google search bar
4. ⌘ + f = find
5. ⌘ + g = find next
6. ⌘ + t = new tab
7. ⌘ + w = close current tab
8. ⌘ + shift + t = reopen accidentally closed tab (Best one ever!)
9. crtl + tab = tab through tabs
10. crtl + shift + tab = tab backwards through tabs

Bonus for Delicious Extension users:

⌘ + Shift + . = pulls delicious page if you have delicious firefox extension installed

No responses yet

Introducing Chit – the only Cheat Sheet you’ve ever need

Jun 21 2008 Published by under English,Mac,OS X,Ruby

It was yesterday, one news in my GitHub feeds which really has got my attention:

defunkt started watching chit 1 hour ago

Who is defunkt anyway? Chris Wanstrath, the guy who sits behind ErrTheBlog, GitHub, FaceBox, Cheat and lots of other cool stuffs.

So, there has to have something really good in Chit! I took a quick look into it and found Chit is really Awesome!

Chit

Chit is a command line cheat sheet utility based on git.

AUTHOR: Robin Lu. Thank you, Robin!

FEATURES:

Chit was inspired by ‘cheat’ by Chris Wanstrath. You can use chit to access and manage your cheat sheets easily.

There are several differences between ‘cheat’ and ‘chit’. By using chit, besides the wonderful features of ‘cheat’, you get:

1. Git powered cheat sheet repository. You can specify where you get the sheets and where to share them.
2. Your own private cheat sheets. Everybody has some project related or smoe cheat sheets which are not mean to public. You can also put them into chit
3. Directory support. You can group cheat sheets by directory now.
4. One less letter to type.

REQUIREMENTS:

rubygems (You already have, don’t you?!), git (sudo gem install git) and hoe (sudo gem install hoe)

INSTALL:

sudo gem install robin-chit -s http://gems.github.com

USAGE:

To get a feeling about chit:

$ chit chit

To get a cheat sheet:

$ chit [cheatsheet]

If it does not exist, a new one will be created and waiting for your editing. Leave it blank and quit the editor if you don’t want to add a new one.

To edit a cheat sheet, use the—edit switch.

$ chit [cheatsheet] –edit

To add a cheat sheet, use the—add switch.

$ chit [cheatsheet] –add

During editing a cheat sheet, empty the content will get the cheat sheet removed.

A prefix ’@’ indicates the cheat sheet is in private mode. A private cheat sheet is kept in another repository.

To get a private cheat sheet:

$ chit @[cheatsheet]

The prefix ’@’ works the same for both—edit and—add.

The cheat sheet can be in a path. For example:

$ chit mysql/select

will get the cheat sheet ‘select’ under mysql.

To show all the cheat sheets:

$ chit [all|sheets]

To show all the private cheat sheets:

$ chit @[all|sheets]

To search cheat sheets begin with ‘name’, use the—search/-s switch

$ chit name -s

SHARE:

Thanks git, shareing cheat sheets has never been such easier.

After the first time running chit, chit will create 2 local git repositories:

  • ~/.chit/main, which will pull out the default cheat sheets repository from http://github.com/robin/chitsheet
  • ~/.chit/private, which will be empty and wait for you to fill it out all your private goodies

After that, they are all yours. You can use git to do all the fancy things: push to a shared server for your team, push to github repo share with us, pull from some other shared place…

WANT TO KNOW MORE:

Chit GitHub Repository

Chit GitHub Wiki – Most of this post is copied from here.

chit – 基于git的cheat sheets工具 – Only if you can read Chinese

chit – cheat sheetsnowa forked chit and added custom repository config support – It was wrote in Chinese too.

Cheat + Git = ChitChris Wanstrath @ GitHub

WHAT’S NEXT?

Chit and share your sheets!

6 responses so far

Mondrianum gets a update!

Jun 19 2008 Published by under English,Mac,OS X

Mondrianum is one of my favorite color pickers on Mac OS X, as it brings all the goodies from Adobe® kuler, the best color themes sharing community!

The last version of Mondrianum, 1.0b5 had exired on June 14, even it is still a freeware now. So two authors did a quick update and sent an apology out, which I think is great.

You can download the latest version from their site, and this version could be used until Sep. 30, 2008. I believe they will release another before that day.

The most interested part for me is not the post or software itself, it is the comment! One of the visitors left a comment said “I love your product and what you are doing… For the heck of it I slightly edited your statement to make the english flow a little more ‘natively.’”

What a lovely reader! I wish I could have some of them too!

Anyway, before they could update the post, I did a quick diff on them:

So, my dear readers, if you find anything wrong in my posts, please leave a comment. I would love to fix it!

Thanks! :)

No responses yet

(Re)Enable TextMate Ruby Bundle

May 11 2008 Published by under English,Mac,Ruby,Software

We all love TextMate, by all means. It is the best friend for Ruby Developers.

After our project upgraded to Rails 2.0+ at LearnHub.com, I noticed that there are some very powerful Ruby Bundle Commands just stopped working. Especially these two:

  • Run Focused Unit Test

This is an awesome lovely command in Ruby Bundle, absolutely my favorite! It allows you to run a single unit test out of a whole suite of tests by simply positioning your cursor into the test you’d like to run.

  • Run Rake Task

This is another cool command too. It shows a popup window which list all the available rake tasks you have and it will show a pretty HTML result window after you choose from the list.

This thing really bothers me a lot. I could be fine for the second one, as I do have terminal windows open all the time. But I really really miss the first one, as our test files get longer very soon.

I have to make it work!

After couple of hours trying today, I’ve pretty much got the right reason and the simple solution, for now.

The reason is that TextMate includes its own version of builder.rb, which is conflicting with Rails 2.0′ version of builder.rb.

The simple solution:

  1. Open TextMate Bundlers Editor
  2. Find Ruby -> Run Focused Unit Test
  3. Search for RUBYLIB=”$TM_BUNDLE_SUPPORT/RakeMate${RUBYLIB:+:$RUBYLIB}”
  4. Change to RUBYLIB=”$TM_BUNDLE_SUPPORT/RakeMate”
  5. Reload Bundlers

That’s it! And apply the same changing method to other commands such as “Run Rake Task” as well.

And just want to point out the alternate solution is:

mv /Applications/TextMate.app/Contents/SharedSupport/Support/lib/Builder.rb /Applications/TextMate.app/Contents/SharedSupport/Support/lib/Builder.rb.bak

It’s up to you to choose one of them.

Hope Google can pickup this post quickly so we can save somebody else sometime too. :)

Enjoy!

3 responses so far

Java SE 6 on Leopard, Officially!

Apr 29 2008 Published by under Apple,English,Java,Mac,OS X

Half a year after Leopard has been released, we finally get an official Java SE 6 from Apple today!

Java for Mac OS X 10.5 Update 1 adds support for Java SE 6

Thanks Apple! Anyway…

As you can see from the description:

This update does not replace the existing installation of J2SE 5.0 or change the default version of Java.

So if you want to make Java SE 6 your default version of Java, there is one thing you need to do:

sudo ln….. OK, no command line this time.

Here is the right way to do:

  1. Launch /Applications/Utilities/Java/Java\ Preferences.app
  2. Drag “Java SE 6 (64-bit)” to the top of the “Java Application runtime Setting”
  3. Save

You could change Java Applet Runtime Version to J2SE 6 too, but please make sure you know you really need it.

Enjoy!

2 responses so far

Update RubyGems to new Version on Leopard

Apr 03 2008 Published by under Apple,Mac,OS X,Ruby

RubyGems just updated to version 1.1.0. Couple of the major changes are “Index updates are much faster now” and “only updates from a latest index by default”. So, time to update.

As Leopard already has Ruby and RubyGems preinstalled (Thanks, Apple!). So the default update way:

$ sudo gem update –system

will NOT work well.

Here is what you should do on Leopard 10.5.2:

$ sudo gem install rubygems-update
$ sudo update_rubygems

Enjoy!

8 responses so far

Fix New MacBook Pro AirPort problem

Apr 02 2008 Published by under Apple,Mac,OS X

I’ve got my Shinning super cool new MacBook Pro two weeks ago. Everything works fine until recently after some automatic updates.

The MacBook Pro I have is 2.4GHz 15′ version. I am so loving it! But the AirPort problem is really annonying!

For some reason, at the end of the day, pretty much every day, MacBook Pro wireless connection just suddenly stop working with my AirPort Extreme. But at the same time my old MacBook works just fine. Turn MacBook Pro AirPort off and on, and try to connect to my wireless network again and again. Nothing helps. Rebooting AirPort Extreme again and again just helps a little. Some logs on console:

airportd Error: Apple80211Associated() failed -6

_emUIServer Error: airport MIG failed = -6 ((null) port = 45523

Did a google search and found a lot of people do have the same problem and so far there is no good solution yet. Some of them said go back to 10.5.1 actually fix the problem, and this is a suggestion from Apple Genius. Which I think is a solution but it is for away from good. I don’t really want to downgrade as I already installed too much into my Leopard and spent amount of time to make it works smothly as what my MacBook does.

This is really pain!

Spend some more time these two days and did some more tests. Finally have good progress. But couple of the tests is really risky, such as, Leopard told me no AirPort Card installed after rebooting. :D

Anyway, here is the simplest but working solution:

  1. Find your original “MacBook Pro Mac OS X Install Disc 1″, please make sure it is yours, not somebody else’s!
  2. copy /System/Library/Extensions/IO80211Family.kext from “Mac OS X Install Disc 1” overwrite to your Macintosh\ HD/System/Library/Extensions/IO80211Family.kext
  3. After couple of seconds, Leopard will pick up your changes and your MacBook Pro will link back to wireless network again without any problem!

Yes, you don’t even need a reboot! :)

If you couldn’t find your original install disc 1, you still can use someone’s if them have the same model as your MacBook Pro. But make sure do a backup for IO80211Family.kext.

Enjoy!

Maxwell Rocatanski suggested Pacifist for whom aren’t as comfortable using the terminal. Thanks MaxWell!

41 responses so far

Democamp Toronto, Flex and Air, Haxies

Feb 25 2008 Published by under Apple,English,Mac,Toronto

1. Democamp Toronto 17

Democamp Toronto 17 is absolutely another great event again! More than 300 people have attended.

Only want to highlight two here:

  • AskItOnline is a online survey system created by Kaitlyn MacLachlan totally on her own. It is a pretty beautiful and useful application. Kaitlyn wins the best demo prize.
  • Ignite presentation “The State of Wireless in Canada Sucks” from Tom Purves could be the best ignite presentation in the history of Democamp Toronto so far. Well done, Tom!

Joey Devilla had a very detail post on the schedules, please check it out here. I believe he will post some more tonight soon.

Check out the official site of Democamp Toronto too: http://democamp.info/

2. Adobe Flex 3.0 and Air 1.0

Finally, its On – Flex 3.0 and Adobe AIR 1.0 Are Here!

3. Haxies updated! It works on Leopard!

Haxies – Love it or hate it!

In computing, a Haxie is a term which was coined by developer Unsanity to describe their products. It is a blend of “hack” and “Mac OS X”. Unsanity uses it to refer to “hacks” that are specifically designed for use with its Application Enhancer (APE) software. These are typically small interface and functionality tweaks to the system or existing applications by injecting code into programs as they load.

Until yesterday, all the haxies which come from Unsanity or other companies didn’t work on Leopard, all of them. It is a real pain for somebody who loves these little, cute and useful hack tools, such as me.

After several months hard work, the development team in Unsanity finally bring them back to Leopard today: Enthusiastic Trepidation!

Here are some of them what I use all the time:

WindowShade X. It minimizes your windows on desktop, or shades them.

FontCard. It shows a WYSIWYG font menu for your applications.

FruitMenu. It helps you easily access everything from your menu.

Menu Master. It helps you to create shortcut keys for any menu items of any your applications.

Big day today, by all means!

2 responses so far

Workaround on Aperture 2.0 Crashes

Feb 23 2008 Published by under Apple,English,Mac,OS X

I am using iPhoto to manage all my pictures as I don’t think I am a photographer or a shutterbug in any way. And iPhoto does have all the features what I really need. So I didn’t pay any attention on Aperture before.

One of my friend was coming to me and asked a question about Aperture 2.0 today. He said he was trying it in another day, but it crashed all the time when he want to export pictures out, even click “Export” preference tab would crash too.

This is really unusual for a software which is came from Apple. :)

Before ask google, I did a quick look on his log file. Interestingly, before crashing there was one line said something about color pickers. So I opened his ~/Library/ColorPickers and found he has installed pretty much every color pickers what I have mentioned in another post – “Choose your right colors on Mac is not easy – My Mac Serial 1“. :D

Simply moving color pickers out really solved the Aperture crashing problem. So it is the issue resource then.

Well, we still need some color pickers, right? I put every color pickers back one by one and found “RCWebColorPicker” is the one who breaks Aperture this time.

Anyway, here are some more information:

No responses yet

« Prev - Next »