Accidental Technologist

Musings about Entrepreneurship, Technology and Software Development

  • Home
  • About
  • Still River Software
  • Privacy Policy

Powered by Genesis

Tip: Save Typing ‘bundle exec’

February 17, 2017 by Rob Bazinet Leave a Comment

Tweet

If you’re a Ruby on Rails developer, you probably type the words bundle exec numerous times a day. I finally got tired of it and decided to do something about it.

In the context of keeping it simple, I use the ‘alias’ command and add to my .profile. I know there are more Rails recommended ways of solving this problem via binstubs but I rather not use that approach.

My solution is simple, add an alias to my .profile like this:

alias be='bundle exec '

Keen observers will notice the trailing space after the command. This space allows for alias chaining and can be helpful.

The resulting shortcut allows this:

bundle exec rspec

To this:

be rspec

The ‘alias’ command is super useful and has many applications to help remove repetitive typing tasks.

Share this:

  • LinkedIn
  • Twitter
  • Facebook
  • Email
  • More
  • Pinterest
  • Tumblr
  • Pocket
  • Reddit

Filed Under: Tips Tagged With: Ruby on Rails, Tips

Mac Tip: Quick Switch Sound Output

August 12, 2015 by Rob Bazinet Leave a Comment

Tweet

I?ve been an Apple Macintosh user for a long time now, but I often do things the hard way.

I work from home and mix up the work day by listening to podcasts. If the family is around I will put on the headphones as to not disturb them, but some days when I?m alone I remove the headphones and listen through the iMac speakers.?

The obvious way to switch from headphones to internal speakers and back again meant I went to System Preferences->Sound, selected the Output tab and then picked which way I wanted to hear the audio. No, not difficult but there has to be a better way.

It turns out there is (otherwise this post was completely pointless). When you go to the Menu Bar you should see the speaker icon. Clicking on it shows you the volume. Here?s the key..if you hold down the Option key while you click on the speaker icon you get a nice menu:

2015 08 12 09 22 43

There you go switch away, nice and easy. ?Maybe everyone already knew this, but I doubt it.?

Share this:

  • LinkedIn
  • Twitter
  • Facebook
  • Email
  • More
  • Pinterest
  • Tumblr
  • Pocket
  • Reddit

Filed Under: Mac Tagged With: mac, OS X, Tips

Recent Posts

  • Overcoming the Mimemagic Fiasco
  • Redis::CommandError – MISCONF Redis is configured to save RDB snapshots
  • frozen_string_literal: the not so magical comment
  • Status Bar in iTerm2
  • Supporting Multiple SSH Keys on macOS

Categories

Services I Love

HatchBox - Easy Rails Deploys Fathom Analytics
Follow @rbazinet

Rob Bazinet
@rbazinet

  • Apple’s trade-in program is a joke. I’ve heard multiple people saying their value lowered for made up reasons - https://t.co/bZK4rqvUpW
    about 9 hours ago
  • I didn’t realize so many Pragmatic Programers titles were available to read online - https://t.co/OrLr01QCip
    about 3 days ago
  • Starts Monday. https://t.co/BkmcjnMRZS
    about 5 days ago
  • This years @railsconf line up of talks looks so good this year - https://t.co/eOwq9qlxs4. I wish it was in-person t… https://t.co/nt7nxV35OH
    about 7 days ago
  • RSS - Posts
  • RSS - Comments
loading Cancel
Post was not sent - check your email addresses!
Email check failed, please try again
Sorry, your blog cannot share posts by email.