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

  • How to Fix Rails Flash Rendering When Using Hotwire
  • Hotwire Fix for CORS Error when using Omniauth
  • Fix Installation of Ruby using rbenv on macOS Big Sur
  • RailsConf 2021 and the Future of Conferences
  • Fixing Out of Diskspace Errors on Amazon EC2

Categories

Services I Love

HatchBox - Easy Rails Deploys Fathom Analytics
Follow @rbazinet

Rob Bazinet
@rbazinet

  • Rails is still a thing - https://t.co/cCw71GUqhN
    about 3 weeks ago
  • I guess Microsoft didn’t learn from Zune - https://t.co/dvznUDGxX4
    about 1 month ago
  • This is so true! I'd love to call out some companies attempting this and making life hard on devs. https://t.co/oNayiZdKlc
    about 2 months ago
  • I’m looking for a good Mac client app to backup my Mac to my Synology NAS. Any suggestions? I’m looking for something besides Arq 7.
    about 4 months ago
  • Hotwire Course Early Access is Open https://t.co/GeW2W0HLYI
    about 5 months ago
  • RSS - Posts
  • RSS - Comments