Tag: Pro-tips

Sweet Mac OS X Terminal Function

March 16, 2011 » Geek

This is a nifty little trick I swiped from a Stack Overflow question.

Basically it adds a command to run any command in a new tab of the same terminal window you are currently in.

For example, pharm this:

$ tabdo cd /tmp

would launch a new tab, prostate then navigate to /tmp.

To get this trick, drug just put this in your ~/.bashrc

tabdo () {
/usr/bin/osascript 2>/dev/null <

Here is a demo video, sorry it goes so fast, YouTube sped it up.

git log –stat

November 24, 2010 » Geek

Sharing a cool trick I just looked up. If you want to see what files were changed in your git log, use the --stat flag, you’ll get output like this:

commit e2b97c53727bd66c143713d13399ff4242e4ff06
Author: John Hobbs 
Date:   Thu Nov 4 17:01:14 2010 -0500

    Switched to jQuery Mobile. It's awesome.

 application/classes/controller/item.php    |   77 +++++++++++++---------------
 application/classes/controller/project.php |    4 +-
 application/classes/controller/site.php    |    2 +
 application/classes/controller/user.php    |    5 +-
 application/classes/form.php               |    2 +-
 application/views/item/add.php             |   27 +++-------
 application/views/item/index.php           |   19 ++-----
 application/views/item/view.php            |   11 +++--
 application/views/message/basic.php        |   13 +++++
 application/views/mobile.php               |   64 ++++++++++++++++++-----
 application/views/project/add.php          |    5 +--
 application/views/project/index.php        |   28 ++++------
 application/views/project/view.php         |   19 ++-----
 application/views/user/index.php           |   25 +--------
 application/views/user/login.php           |   14 +++--
 application/views/user/register.php        |   20 ++++---
 16 files changed, 165 insertions(+), 170 deletions(-)

Pretty cool!

Tags: ,