I’m a Richardson, RU?

09 Oct, 2007

12 Profile Shortcuts I can’t live without

Posted by: imarichardson In: Programming & Development

RailsIf you’re a developer on a Mac or Linux box, building in Rails using Capistrano like me you can get really tired of having to “cd” to a 25 character long directory path 10 times a day while running all your script/”whatevers” while you work. Well, here’s my list of 12 shortcuts I can’t live without.

If you’re on a Mac, you’ll need to edit your “/etc/profile” page and then type these in, so something like “$textedit /etc/profile” or “$ mate /etc/profile” (if you are using TextMate) from your Terminal window will open your system profile.

  1. # /directories
  2. alias gotoMyDir="cd /Some/Path/To/A/Frequently/Accessed_Directory"
  3.  
  4. # Rails
  5. #The next shortcut only opens up the rails directories I care about using TextMate
  6. alias matedir="mate app config lib db public test vendor/plugins &"
  7. alias ss="./script/server"
  8. alias sc="./script/console"
  9. alias sg="./script/generate"
  10. alias sp="./script/plugin"
  11.  
  12. #Rails Capistrano ... yes, I am using Capistrano 1.4.1 instead of 2.x
  13. alias capd="cap _1.4.1_ deploy"
  14. alias capdm="cap _1.4.1_ deploy_with_migrations"
  15. alias capapache="cap _1.4.1_ restart_apache"
  16. alias caprestart="cap _1.4.1_ restart_mongrel_cluster"
  17. alias capstart="cap _1.4.1_ start_mongrel_cluster"
  18. alias capstop="cap _1.4.1_ stop_mongrel_cluster"

Now what’s nice is that f I want to visit “my directory”, while in the terminal I just type”$ gotoMyDir”; if I need to run a capistrano “deploy_with_migrations” script (yes, I’m using 1.4.1 until a few more 2.0 updates finalize) I just type in “$ capdm” … you get the picture.

Nice indeed, and saves the keys!

No Responses to "12 Profile Shortcuts I can’t live without"

Comment Form

You must be logged in to post a comment.

I'mARichardson Who?

Who am I? Well, let's see: I'm a husband, father, brother, God-father, down to earth, relaxed, happy kinda guy who likes clean code, long walks on the beach, takes his laptop with him everywhere he goes, and (as I'd like to think) all around good guy!