Archive for February, 2014

Bash Safety Tip: Check for Terminal Prompt

Wednesday, February 19th, 2014

Ubuntu Tux

I was having a pretty painful issue with SCP the other day and it took me a few hours to get to the bottom of it, but there's a lesson to be learned here. The problem was that I was able to SSH to a host, but was not able to SCP to that same host. The keys were good, the permissions on the key files were good - and SSH was just fine. It was just SCP.

Finally, I figure out it was my .bashrc file. I had added some functions in there, and they were doing fine with a terminal session, but the SCP "head-less" session was causing it to hang. Horribly. And that's the Safety Tip for the day:

Add this after the alias commands at the top of your .bashrc:

  # skip the rest if we're not interactive
  if [ -z "$PS1" ]; then
      return
  fi

and then you'll have the aliases if you need them, but you won't have the rest that could foul up the SCP session.

Very useful tip. Do it.

Turning a Corner – Getting a New Laptop Bag

Wednesday, February 19th, 2014

Chrome Bag

I've been thinking about a new laptop bag for quite a while. As in more than a year now, and the one I've wanted was a nice successor to my Spire Volt. It's several years old now, and I was thinking that if I got a new retina MacBook Pro, I'd need a new 'boot', as they call it, to hold the new machine. But sadly, Spire is in trouble getting things out, and their selection of bags has really shrunk. Also, the 'boot' for the rMBP is zippered, and I don't like that - I like the velcro that my Volt has. So I went looking.

I worked with a really great guy that had a Chrome messenger bag, and the tweet he sent out one day with a 40 lbs. bag of dog food along with his laptop, shirt, etc. all in his bag made me a believer. It was an impressive amount of stuff.

I find that there are a few times that I really want to carry a good bit of stuff to the office - candy bars for my favorite Clojure guru, work laptop, etc. and the space I have in my Volt is nice, but it was a touch small at times. So I wanted something big.

I also loved the Spire lifetime guarantee, and a solid construction where I felt that the guarantee wasn't going to be needed. I don't treat things badly, but I want to know that I don't have to protect them when their job is protecting everything I have of value. My bag is it. This is my life in a carry-on bag. There's this and my house, and that's my life. So when I have something in my bag, I want to know it's safe.

So I looked at the Chrome messenger bags and the Metropolis looked like what I wanted. Sized for a 17" laptop, but a sleeve for a 15" MacBook Pro... black on black - with a black buckle - just like my all-black Volt... and Chrome even had the phone caddy for my iPhone. It was sweet. But I didn't pull the trigger on it. I was waiting. For what, I don't know but I think it was today.

Right now, I'm carrying two laptops every day to work - mine, a 17" MacBook Pro, and a work 15" retina MacBook Pro. I have to say, the 15" rMBP has convinced me to downsize, as it were, and yet I have to carry two because I have my life on this laptop, but work is work, and there's a reason they are separate. What I needed was a machine at home that I could set-up as a work machine and just keep work stuff on it, but not carry it back and forth.

So if I got a new 15" rMBP for my laptop, and put my work account on my 17", then I could leave it at home for those times I got the wake-up call, and not have to carry my work 15" rMBP back and forth. Sure, it means buying a new laptop, but that's not such a horrible thing, now is it?

So this morning I decided to get the bag - sleeve, phone case and all. Ordered it and it's on it's way to me. I still need to order the laptop, but that's no big deal, the hard part was convincing myself that it was the right time to make the change. Switch up and go messenger bag and move to a new laptop. The rest is just timing.

I'm starting to feel like I have a little more control in my life. It's not as bleak as it used to me. It's a good feeling.

Looking Back at My Most Painful Year

Monday, February 3rd, 2014

On the weekend, I passed a sad anniversary - one year ago, my wife of 27 years told me to leave. Said she never really loved me - that I was just a better alternative than moving back in with her parents after college. I believed her. Still do. It's been a hard year, a few months in I decided not to describe it as "My Most Painful Year", and instead take a term from Neil Simon, and call it Chapter Two. It didn't help. Still doesn't.

My term was accurate, and it still is. I've tried several times to find that joy that made we want to post about all the interesting things I was doing with technology. All the fun I was having - and even ranting a bit here and there about the crazy things companies do when they think no one's looking. But it's really been hit and miss. I'm lucky to force myself to post something once a month.

Even this post - I should be able to rattle off a year's worth of stories looking back on this year, but I find I have no interest in doing that. What does it matter? It's not going to make me feel any better, I'm not through this, I'm still in the middle of it. That's not the time to look back and try to gather the lessons learned. It's the time to get out of it.

My friends say that time will make this all better. Maybe it will. I'd like to think that some day I'll wake up and not feel this way, but I have my doubts. I don't see why another year is going to make any difference. The last one really hasn't. I don't feel any better. I just feel a year older.

It's been a bad year. That's about the sum total of what I've learned.