Thursday, November 18, 2010

Changing the computer name on terminal


sudo scutil --set HostName [NewMacComputerName]

Next flush the DNS cache on the Mac by entering the command:

dscacheutil -flushcache

Thursday, November 11, 2010

Removing 1Password agent on Snow Leopard

months after i uninstalled 1Password something was still spamming my log files.



It seemed like launchd has some problems, so i headed over one of the following folders

/System/Library/LaunchDaemons
/System/Library/LaunchAgents
/Library/LaunchDaemons
/Library/LaunchAgents
~/Library/LaunchAgents

I found this entry

ws.agile.1PasswordAgent.plist

let's delete it and refresh launchd

launchctl remove ws.agile.1PasswordAgent

and the problem has gone.

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"

Monday, September 20, 2010

FDTG Principles for Developers

this is a small reminder for me no to forget these principles.

Flexibility
Be ready to change your plans when they’re not working the way you expected; don’t count on things remaining stable.

Decentralization
Centralized systems look strong, but when they fail, they fail catastrophically.

Transparency
Don’t hide your systems; transparency makes it easier to figure out where a problem may lie. Share your plans and preparations, and listen when people point out flaws.

Graceful Failure
Failure happens, so make sure that a failure state won’t make things worse than they are already.