Saturday, October 23, 2010

iTunes search with command f

To use Command-F to get to the search field in iTunes you have to execute the following in Terminal.

defaults write com.apple.iTunes NSUserKeyEquivalents -dict-add "Target Search Field" "@F"

You have to restart iTunes to make it work.

Tuesday, October 19, 2010

gitignore and already tracked files

If a file is already being tracked by Git, adding the file to .gitignore won’t stop Git from tracking it.

You’ll need to do

git rm --cached <file>

to keep the file in your tree and then ignore it.

Sunday, October 17, 2010

SVG JavaScript Libraries

SVG has been in development since 1999 and in 2010 we can say that all major modern web browsers except Microsoft Internet Explorer, support and render SVG markup directly. The Internet Explorer 9 beta supports SVG.

But dealing with SVG documents remained painful, don't despair there are JavaScript libraries to help.


Protovis
Great for data visualization.
It only works in browsers that have native SVG support.


Raphael
It's a good starter library, easy to do a LOT of things with SVG quickly. Well written and documented. Lots of examples and Demos. Very extensible architecture. Great with animation.

But note that there are ways of expressing things in SVG that are not possible in Raphael. There are no "groups". This implies that you can't implement layers of Coordinate Transfomations. Instead there is only one coordinate transform available.
If your design depends on nested coordinate transforms, Raphael is not for you.

It supports Firefox 3.0+, Safari 3.0+, Chrome 5.0+, Opera 9.5+ and Internet Explorer 6.0+.


jQuery SVG
Well written and documented. Lots of examples and demos. Supports most SVG elements, allows native access to elements easily.

It only works in browsers that have native SVG support.


SVG Web
It uses flash to render in non-SVG compliant browsers.

Monday, October 4, 2010

List open ports on Mac OS X

sudo lsof -i -P | grep -i "listen"