Archive for the 'Mac' Category
One task I keep doing each day when I work on a Rails project is:
- launch iTerm
- cd to my rails project
- start
script/server - open a new tab
- cd to my rails project
You see the ugly, terrible, horrible time wasting duplicated task (cd to my rails project). I’m so sorry I kept doing this for so long and now admit it on my blog! Now it’s there forever and in 10 years my kids will Google my name and find this stupid thing and lose all faith in their father, my wife will leave me and I’ll quit programming. I’m sorry, really…
Well, to be sure founding a family won’t make me quit programming, I made a small shell script to make this less painful and more DRYfull:
tab() # new tab from current dir
{
osascript -e "
tell application \"iTerm\"
tell the first terminal
launch session \"Default Session\"
tell the last session
write text \"cd $(pwd)\"
end tell
end tell
end tell"
}
Place this in your ~/.bash_profile then type tab in your terminal window to see some magic happen.
Let me know if this is helpful to you!

A couple of weeks ago, I bought a cool white 2 Ghz MacBook. It’s actually the first time I really use a Mac and I got to say that I’m pleased and surprised! I switched for 3 main reasons:
1. It looks cool
2. It’s unix based (darwin)
3. It just works
I think that only people with bad taste can argue that a MacBook doesn’t look good. The only problem is that I’m starting to get those yellow discoloration on the bottom plus an ugly stain that wont go away is parked on the right side. But I called Apple and they’ll replace the case without arguing to much. Other then that, it’s true that it get a little bit hot sometimes (up to 80 C on full processor usage). But I still love it! The keyboard feels so good you just want to type all day.
Another stupid reason I bought a Mac was to use TextMate. At first I tough I’d miss auto-completion and things like that but I found snippets and commands functionalities much more powerful. Plus, TextMate is fully scriptable in bash, ruby, python, etc.
I got to admit that I was largely influenced by other geek around the net, but hey! Why should they have all the fun ? And what are you waiting for ? Go buy yourself Mac !









Recent Comments