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

  • Social Media Times Are Changing
  • It has certainly been a long time…
  • 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

Categories

Services I Love

HatchBox - Easy Rails Deploys Fathom Analytics
Follow @rbazinet

Rob Bazinet
@rbazinet

  • Great little utility https://t.co/6AgboJv6oI
    about 1 day ago
  • Funny watching the hate to show up in my time line for ChatGPT. People getting defensive about it.
    about 4 days ago
  • I just backed The SaaS Playbook, by Rob Walling on @Kickstarter https://t.co/1FpTWN9c9v
    about 5 days ago
  • This looks like an interesting project. I need to dig in a bit. https://t.co/gacEX9AmEn "Phlex — fast, object-orie… https://t.co/4AUL0Z0SBl
    about 5 days ago
  • I attempted to use ChatGPT today and asked a couple questions it couldn’t answer. I thought it was a magical black… https://t.co/uJGw0CgUAv
    about 5 days ago
  • RSS - Posts
  • RSS - Comments
Find me on Mastodon