Accidental Technologist

Musings about Entrepreneurship, Technology and Software Development

  • Home
  • About
  • Still River Software
  • Privacy Policy

Powered by Genesis

Supporting Multiple SSH Keys on macOS

April 3, 2020 by Rob Bazinet Leave a Comment

Tweet

If you’re a developer, on devops or a system admin you probably use an SSH key to log into remote servers.

I am typically on multiple projects at one time and some organizations require I generate a unique SSH key in order to work with them. I’ve been fortunate until recently that my personal SSH key was acceptable.

So, how can you have two or more SSH keys available on your system at any one time? I am running a Mac but I assume this would work on Linux as well.

It’s not hard and when setup, it works really well.

Getting Started

The first part is generate a new SSH key. Understand that the email you’re using here may be an email provided by you client or company. It may not be the email you normally use.

ssh-keygen -t rsa -b 4096 -C "[email protected]"

There are a few different types of keys you can generate. If you’re interested, GitHub has some good help with SSH keys.

Generating public/private rsa key pair.
Enter file in which to save the key (/Users/rbazinet/.ssh/id_rsa): example_com_id_rsa

I use something specific to the company for who I’m adding the key. You can see here the new SSH key is example_com_id_rsa. Please be careful here, if you leave the default you may overwrite your existing key. You probably don’t want to do that.

The Key is the Config

Head on over to where your SSH keys are stored, probably in ~/.ssh directory. Edit the config file, simple called config. It probably looks like mine:

Host *
AddKeysToAgent yes
UseKeychain yes
IdentityFile ~/.ssh/id_rsa

Add your additional host. I added mine above the original.

Host git.example.com
Preferredauthentications publickey
IdentityFile ~/.ssh/example_com_id_rsa
Host *
AddKeysToAgent yes
UseKeychain yes
IdentityFile ~/.ssh/id_rsa

The host is the system you need access to. It could be a git server or some other resource. Wildcards work here so if you need to access all resources on s particular domain, you would handle that here. There are a lot of things you can do in the config file and way you do them varies in complexity. If you want a more detailed explanation, Digital Ocean has a good resource.

I hope this helps.

Share this:

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

Filed Under: Mac Tagged With: macOS, ssh keys

Using the Microsoft Ergonomic Keyboard on macOS

April 1, 2020 by Rob Bazinet Leave a Comment

Tweet

IMG 6167

I’ve been through a fair number of keyboards over the years, some expensive and some not. One of my favorites is still the CODE Keyboard, which I wrote about before. I still love this keyboard but I was starting to have pain in my forearms after a long day of typing. I keep coming back to the Microsoft Ergonomic Keyboard to on macOS. Why? Because it’s a tradeoff between being ergonomic and being inexpensive. I’ve seen some other customizable keyboards in the range of $350 but I haven’t found the large price tag necessary.

One annoyance when using many keyboards is the fact that they are setup for Windows operation system and not macOS. This means the Command key is not to the left of the space bar as Mac people expect. The Microsoft Ergonomic keyboard has the Alt key in that location. It’s a simple fix.

Go to System Preferences -> Keyboard -> Modifier Keys…

2020 03 31 10 47 16

Notice the Option Key and Command Key defaults. The Mac is recognizing the Alt key as the Option key. We need to make a change.

MicrosoftKeyboard Before

The easy fix is to swap the two keys in the modifier. Option becomes Command and Command switches to Option. Click OK and everything should work as expected.

MicrosoftKeyboard After

This saved the day with properly mapping the command key. If you need other keys mapped differently on this keyboard, there is another option. Karabiner is a powerful utility for the Mac that allows a wide variety of keyboard mapping. It was more than I needed.

I hope this helps.

Share this:

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

Filed Under: Mac Tagged With: Ergonomic Keyboard, macOS, Microsoft

10 Steps to Survive Working from Home

March 11, 2020 by Rob Bazinet Leave a Comment

Tweet

10 Steps to Survive Working from Home

I’ve been working from home for the past 16 years and love it. I wouldn’t have it any other way. Surviving working from home when you’ve never done it, can be challenging.

Working from home isn’t for everyone and takes discipline.

I thought with all the people recently forced to work from home due to COVID-19, I’d share some tips that have helped me over the years.

  1. Find a dedicated space. Even if it’s temporary, have a place you go to in your home. If all you have is a bedroom then try to create the environment there, a small table near a window would work well. If you have a dining room or kitchen to use, then set up on a table in there. You may need to move at the end of the day for dinner if you don’t live alone. Sitting on the couch in the living room with the TV on probably isn’t going to work.
  2. If you have a family with young children home, try to set boundaries. Let others know you are home to work, and there will be time after your day is done for time to be part of the family. If it’s hard to have quiet time, get a pair of noise-canceling headphones. I use Bose QC-35’s and love them. Unfortunately, they are not cheap.
  3. Get up and do the same routine you’d do if going into the office. If you get up at 6:00 am, shower and get dressed. If you have an hour commute, then use that time to listen to a podcast, audiobook, or catch-up on the news. Start work at the same time.
  4. If you’re used to a busy office, have the radio on or TV in another room to provide some background noise. Silence can be hard to deal with, and adding some level of noise can help. I like quiet when I’m deep in work but like background sound otherwise.
  5. Stay in touch with coworkers via Slack, Zoom, or other means. Brief video calls with Zoom during the day can help you feel connected. This one is probably one of the most important. It can be lonely working from home, and you have to figure out how to fill the void.
  6. Leave your desk for lunch, even to the living room or deck. It would help if you got away from your computer.
  7. Take plenty of breaks. It’s essential to get away from the computer, so get up and get some water (yes, drink plenty) or set outside.
  8. Eat as you do at work, don’t indulge because the food is close. Too much food can make you feel lethargic and lead to unnecessary weight gain.
  9. End your day by making some notes about what you plan to work on the next workday. This way, you get to your computer and have a plan to get your day started. I’ve gotten into this habit; it reminds me of what I was working on and where I need to start for the day.
  10. Stop working the same time you usually do, don’t feel like you should be working more because you’re home.

I hope this helps.

Remember, it’s only temporary. Maybe this new lifestyle will suit you, and you will want to work from home more.

Photo by Thought Catalog on Unsplash

Share this:

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

Filed Under: Remote Work Tagged With: remote working

“Are you building a business or learning a stack?”

March 2, 2020 by Rob Bazinet Leave a Comment

Tweet

Stefan cosma 0gO3 b 5m80 unsplash

I always love when someone posts something online saying they have an idea for an application and ask, “What stack should I use?”

It’s a fair question, but the answers usually start with “it depends”.

What is a “stack”?

The “stack”, for those unfamiliar with the term, refers to what programming language, frameworks, and database a project uses to get its work done.

Examples could be Ruby, Ruby on Rails and PostgreSQL, or JavaScript, NodeJS and MongoDB or maybe C#, ASP.NET Core, and SQL Server. All acceptable choices to build a web application.

Indie Hackers

There is a post on Indie Hackers, titled Tech Stack Suggestions. The original poster wants to build an MVP for his business idea and is soliciting opinions as to what stack to use.

He’s wondering about using a frontend framework like React and replies to someone suggesting he keep it simple:

Shouldn’t I be using a frontend framework in order to develop this? Backend Django + SQL has its advantages, in fact, the current project I’m working on in my organization is partially based on that. But, I’d like to implement things like GraphQL, NoSQL primarily to get a more hands-on on how they’d work in a real project. Would really appreciate your input.

Volkan Kaya replies with brilliant and practical advice:

Are you building a business or learning a stack?
If you want to learn a stack do it while being paid, not while starting a business.

Nick Haskins pragmatically suggests:

It’s really unfortunate that our industry has convinced you that you need to utilize tooling built for larger applications. On behalf of the industry, I apologize for that.
You do not need a front-end framework to develop a web app.
I’ve built multiple very large apps with Rails + Bootstrap. No ReactJS. No VueJS. No JS libs, just a sprinkle of jQuery.

These are examples of excellent and practical advice. The responses to the post include a lot of misguided answers as well.

Shiny Things

The thread from Indie Hackers sums up what it’s like to be a technologist who wants to build their software. You should give the thread a read.

It’s easy to want to build something and want to use the latest frameworks. It’s a great chance to learn something new. I’m all for learning; you should never stop. But, if your goal is to build a business and challenge yourself with new technology while doing it is not the best decision.

I’ve been guilty of trying to convince myself there’s some technology I need to use because applications that are created with it are faster or scale better. It’s not essential before you have that problem. People will try to justify using it anyway.

Don’t follow like sheep do…right off a cliff.

Love the One You’re With

It’s best to take a step back and breathe. Take stock in yourself and where your strengths lie. Ask yourself which programming language and framework you use most today? Which one do you make a living using today?

What is wrong with this combination that you wouldn’t want to use it to create your application? You want to make the right choice and not regret it later.

In its most basic form, people want to make an application and try to think too far ahead. Thoughts of scaling, finding developers, performance, and such things that don’t matter until later.

As a software entrepreneur, more appropriate questions you should be asking yourself are:

  • Am I solving a real problem?
  • Do I know people who will pay me money for my solution?

These are the questions to ask yourself now. Notice these have nothing to do with the stack you choose.

The simple answer to the stack question as a developer is to use the stack, you know, leading from idea to product in the shortest amount of time.

Why strap yourself with two hard problems? Toss the stack problem right out the window.

The best advice is to use the framework you are most comfortable with and will be the most efficient—the one you can get done what you want in the shortest amount of time. You’ll be happier and have something to show for it.

Don’t let people try to convince you their stack choice is better. They will have convincing arguments. None should sway you.

Exceptions

The above is my rule, but there can be exceptions.

As a Ruby on Rails developer, if I want to build a native Mac application, then I probably need to use Swift or Objective-C. Yes, I could use something like React Native; that’s not the point, so please don’t send me an email to the effect. If I don’t know the language, then I have given myself multiple challenges.

I’m sure there are other instances where I would need to learn something new, but the cases will be unusual when you’re deciding the application to build.

Conclusion

If you’re planning on starting a software business and you’re going to be the primary developer, then use the tools you know best. You are in a great position to get something out for your customers to see. Remember, they don’t care what your application is written in, only that it solves their problems.

Share this:

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

Filed Under: Bootstrapping, Programming, Technology Tagged With: Ruby on Rails, stack

Switching to Fathom Analytics

February 25, 2020 by Rob Bazinet Leave a Comment

Tweet

Fathom analytics

I’ve used Google Analytics for many years, and continuing because it’s free. As time has gone on, I’ve decided to use Google products less and less.

Google Analytics always seemed to be complicated or maybe overly complex for the pieces of data for which I care. It gives many details I have never used.

Enter Fathom

I started looking for an alternative analytics tool. I discovered Fathom. Fathom offers excellent features and the ones I care about most. I like to be able to see:

  • What are people reading?
  • Where are they coming from?
  • What is the visitor’s geographic origination?
  • What browser are visitors using?

I did a quick informal survey of analytics tools on Twitter that resulted in a favorable response for Fathom. They offer a 7-day trial.

  • Fathom allows unlimited sites
  • Privacy – they don’t collect personal data
  • Great support, yes, I know first hand. Quick, helpful replies.
  • Pricing is by total page views over all your sites.

Installation

Installation is simple, add a JavaScript snippet to each page or template to start tracking. If you use WordPress, there is a handy plugin that adds the Fathom Dashboard to WordPress. One issue I had was getting the analytics dashboard to show up in WordPress and making sure sharing is enabled. You need to tell Fathom to share data with WordPress because it’s an external site.

Notice the setting, the default being Viewable by You. Change the setting to Viewable to anyone with the share password.

IMG 0707

If you ignore this setting, you won’t see analytics in the WordPress Dashboard, only a 404 error.

Support

I contacted Fathom support a couple of times, and they were quick to reply from both Twitter and email. A couple features were missing, and support informed me of their full pipeline where features are always being added.

After using Fathom for the past few of weeks, it’s a great solution, and happy I made the change. I purchased an annual plan. Glad to support an indie developer.

If you’d like to check out Fathom and help me out, use my referral link. 🙂

Share this:

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

Filed Under: Technology Tagged With: fathom, WordPress

How to Assign Static IP Address on Raspberry Pi

February 20, 2020 by Rob Bazinet Leave a Comment

Tweet

I have been setting up a Raspberry Pi 3 Model B to use as a Pi-hole server to help block the constant wave of ads my family and I keep seeing on the Internet.

One requirement for Pi-hole is the host Raspberry Pi needs to be configured to use a static IP address.

The Problem

I’ve been configuring and administering Linux servers from the command line for years, but the task of setting up a Raspberry Pi to use a static IP address was a lot more complicated than it should have been.

I started with the Raspbian GUI, expecting a Network Settings dialog where I could make the necessary changes. No such luck.

On to the obligatory Google search to find some instructions on the process. Many people are asking the same question.

Surprisingly, there are very few answers, and even less that worked. A total of 0 worked for me on my Raspberry Pi 3 Model B.

The Solution

After much trial and error, I discovered a combination that works. I wanted to write this up for a couple of reasons; first, to help others that have better things to do with their time and second, a reference I can go back to when I forget how I solved this problem.

It comes down to modifying a couple of files and adding a small bit of configuration.

The first file to update is /etc/dhcpcd.conf:

sudo nano /etc/dhcpcd.conf

Most of what needs to be added already exists in the file commented out. I left the file as-is and added the changes to the bottom of the file.

The first line indicates which interface (network card) I’m configuring, the wired port, if you’re on WiFi use wlan0 instead of eth0 for the interface.

Lines 2-4 should be pretty clear, set the IP addresses specific to your network. Line 4 indicates I am using Cloudflare DNS servers.

Line 5 sets up the static IP address even with no network cable attached. Probably not necessary but I wanted it in there.

interface eth0
static ip_address=192.168.1.200/24
static routers=192.168.1.1
static domain_name_servers=1.1.1.1 1.0.0.1
nolink

Don’t forget to save your changes, Ctrl-x, then select Y and then press Enter to keep the file name.

The second file to update is /etc/network/interfaces:

sudo nano /etc/network/interfaces

I added this to the bottom of the file.

interface eth0 manual

This line means the interface is configured manually and does not use DHCP.

Again, don’t forget to save your changes, Ctrl-x, then select Y and then press Enter to keep the file name.

Restart the DHCP daemon or reboot.

sudo service dhcpcd restart
sudo reboot

Finally

After much trial and error and the static IP address set, configuring the Pi-hole is easy and works great.

I’m currently blocking ads at a feverish pace.

Share this:

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

Filed Under: Raspberry Pi Tagged With: debian, raspberry pi, raspbian

11 Ruby on Rails Podcasts Worth Your Time

February 18, 2020 by Rob Bazinet Leave a Comment

Tweet

Ruby on Rails

There is great value in the Ruby on Rails podcasts and screencasts we have available today. Some podcasts have gone away while others have appeared, and others have changed hosts. The title is a bit deceiving, I’m including some screencasts too.

I wrote up a list of Rails learning resources last week, which included some screencasts. I list those here to keep the resource consistent for folks finding this in the future.

Podcasts

I have far too many podcasts in the Overcast app on my iPhone, but these always get listened to first.

Remote Ruby – three developers, chat about Ruby on Rails, what they’re up to, and the community at large. Occasional guests.

Ruby on Rails Podcast – this podcast has been around a long time and has seen a few hosts. Episodes consist mainly of interviews with people in the industry or who use Rails for their jobs. I do really like the guests and topics, many are the cutting edge of what we are being exposed to in work today.

Ruby Rogues – a long time show featuring a panel of known people from the Rails community who discuss various topics with guests. Episodes are mainly a single timely topic the panel and guest discuss. Approaching 500 episodes.

Rails with Jason – interview-style show with Jason Sweet. Jason has some great guests on his show. If you can listen to only one, I’d try this one. If you can’t get enough of Jason, he has written some great articles.

Maintainable – hosted by Robby Russell, long-time Rails developer and founder of Planet Argon, a Rails development agency. From the Maintainable site:

On Maintainable, we speak with seasoned practitioners who have worked past the problems often associated with technical debt and legacy code. In each episode, our guests will share stories and outline tangible, real-world approaches to software challenges

Running in Production – a podcast about how folks are running various frameworks in a production environment and what it takes to do so. Not strictly talking about Rails, but there are a handful of episodes specifically dealing with challenges of running Rails in production.

The Bike Shed – discussion podcast, with two people from Thoughtbot. Much of the discussion encompasses issues the hosts face while working at the company. The episodes aren’t strictly Rails but cover topics many of us face in our day-to-day development work.

Screencasts

Drifting Ruby – created by Dave Kimura, also a long-time Rails developer. Dave is currently up to 227 episodes with episodes running from ~10 min to ~30 min. You might think these screencasts are probably like those from Go Rails, hardly. I think they complement each other very well. Even for topics, they are the same. I find the approaches very different. There are also free episodes, while others require a small monthly fee.

Go Rails – created by Chris Oliver, who is a great contributor to the community. At the time of this writing, Chris is up to 330 videos of varying lengths (~5 min to ~30 min) covering a full breadth of topics, including everything from Rails concepts to the inevitable problem you’ll face when creating Rails applications. There is also a forum that accompanies the videos were you can ask questions or answer some if you so choose. There are some free videos and a Pro plan you can pay to get the rest of the videos for a reasonable monthly fee. It’s a bargain for sure.

RubyTapas – created by Avdi Grimm, a long-time member of the Ruby community. From the RubyTapas website:

RubyTapas is for the busy Ruby or Rails developer who is ready to reach the next level of code mastery. Short, focused screencasts twice a week will introduce you to a wide variety of intermediate to advanced Ruby concepts and techniques, Object-Oriented design principles, testing practices, refactoring skills, and much more.

RailsCasts – created by Ryan Bates, these short screencasts were the original for the Ruby community focusing on Ruby on Rails. Ryan stepped away from making these a while ago, but many are still relevant today and free.

There’s so much great content in these resources. Whether you like to listen to podcasts or prefer to watch people code in a screencast, there’s plenty to learn. If you find other Ruby and Rails related podcasts, I’d love to know about them.

Share this:

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

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

Podcasters Please Stop Wasting My Time

February 15, 2020 by Rob Bazinet Leave a Comment

Tweet

Mohammad metri 1oKxSKSOowE unsplash

I listen to many podcasts. I have some I’ve followed for years. I have some I add to my favorite podcast app on my iPhone, hear a couple of episodes, and remove.

The number one reason I unsubscribe; the hosts are wasting my time. I don’t have much time each day for podcasts, and when I turn them on, I would like to get right to the details.

I don’t want to list those that I have problems with because I don’t want to call anyone out. Those that waste time know who they are.

Examples of wasting my time:

  • Casual banter. Carrying on about the trip you took or the co-working space you visited adds no value. It’s not the reason I am listening to your podcast. Get to the point.
  • Complaining – many do it, complaining about something unrelated to the topic isn’t adding value to the show.
  • Personal discussions are unrelated to the topic I tuned into in the first place.
  • Your world philosophy – podcasts tend to be a soapbox for some folks, it’s really not the place.

Examples of who does it right:

  • Hanselminutes, Scott Hanselman adds no fluff to his 1/2 hr with listeners. He values their time, and it shows.
  • Rails with Jason
  • Ruby on Rails Podcast

I don’t know why so many podcasters do this. I can only imagine they think they need to fill more time in the show. I’d rather have a short show on-topic than a longer show with talk. I believe shows that run 60 minutes could easily shorten to 30-40 with being on topic

Maybe they think we are interested in their personal stories. Sorry, but I’m not.

Podcasters, value the time of the listener. Address the topic with spot-on discussions and remove the filler. No fluff, just stuff.

Share this:

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

Filed Under: Podcast Tagged With: podcast

Tell Me My Value Up Front

February 14, 2020 by Rob Bazinet Leave a Comment

Tweet

Alexander mils lCPhGxs7pww unsplash

The hiring process is broken. I hear of people who are looking for work, either as a full-time employee or a contractor, go through an extensive interview process, and if they are lucky enough to be offered a role, they cannot afford the salary.

I’d like to see all companies looking to hire people to post the opening and have full-disclosure on the amount of money the candidate will receive if offered the job. I do see some companies offer a range but far too few do this. I think recruiters behave because they are reluctant to share too much information and lose a possible hire.

Imagine going through the hiring process companies many companies use today; 3-5 weeks of multiple rounds of interviews, coding sessions, and onsite visits to learn the money offered was too low. It would be draining.

When I talk to companies about possible projects, I get it the money topic out right away. This way, often the deciding factor, is out in the open.

Share this:

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

Filed Under: Technology Tagged With: consulting, freelancing

You might not need jQuery

February 13, 2020 by Rob Bazinet Leave a Comment

Tweet

This is a really nice resource for those moving from jQuery to JavaScript ES6. I like the 1:1 comparisons.

jQuery and its cousins are great, and by all means use them if it makes it easier to develop your application.

If you’re developing a library on the other hand, please take a moment to consider if you actually need jQuery as a dependency. Maybe you can include a few lines of utility code, and forgo the requirement. If you’re only targeting more modern browsers, you might not need anything more than what the browser ships with.

 

Share this:

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

Filed Under: JavaScript Tagged With: JavaScript, jQuery

« Previous Page
Next Page »

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

  • This is so true and has been my personal take on people complaining they are busy - https://t.co/YW8NTQLXtl
    about 3 days ago
  • Wow…https://t.co/h94ia053sL
    about 4 days ago
  • My Bills lost today but more importantly so did the Dallas Cowboys. Nice seeing the ‘boys done for the season.
    about 5 days ago
  • It looks like the Apple Xcode command line tools is a bit bloated for it to take this long… https://t.co/U0HObTvzXf
    about 2 months ago
  • How many people are mad that @elonmusk bought Twitter yet own or plan to own a Tesla? I bet many.
    about 2 months ago
  • RSS - Posts
  • RSS - Comments