Copying dot files from the shell

This isn’t rocket science, more of a note to self.

Found myself moving to a new work machine at work. Part of that involves copying dot files that Mac OSX finder can’t see. I really only want to move the ones I absolutely need, because I’m moving from a machine that I’ve had for nearly 5 years, so a lot of cruft has accumulated.

I have to return the old machine soon though. So the first thing I did was use Carbon Copy Cloner to back up the entire image to a USB drive. Now, I don’t want to carry that USB drive around everywhere. Once I get the code repositories, etc copied I don’t want to be tethered to it. But I want to hang on to all those dot files and directories in case I miss something and need them.

So what I’ve done in the past is a bunch of ls -la commands, and pick out the ones I know I need, manually copying them one by one. Found myself about to do the same thing again, even though there are some I know for sure I don’t need, and while I could just delete those and copy everything, I still want to keep them on the backup because I’m paranoid.

Copying dot files from the terminal can be a little tricky though. Try doing ls -a .*. You get everything in the current directory and subdirectories. But a couple of grep commands can make it pretty easy:

for x in `ls -a | egrep '^\.\w' | egrep -v 'atom|Web|DS_Store|cache|vagrant'`; 
   do 
   cp -rpv $x ~/dotfiles; 
done

So let’s break this down:

for x in `somecommand`

(note: it’s a backtick, not a single quote!) iterates over the lines of output of somecommand

In this case, somecommand is:

ls -a | egrep '^\.\w' | egrep -v 'atom|Web|DS_Store|cache|vagrant'

The ls command with the -a option lists all files in the current directory including hidden (dot) files, and at this point I’ve already cd’d to the directory containing the dot files on my backup drive.

We then pipe that to:

egrep '^\.\w'

that filters the output of ls to only include filenames that start with a ‘.’ (the backtick must be used to escape the period, since otherwise it means match any character) followed by a word character. We match on the word character because otherwise the output would include entries for “.” and “..” which we don’t want to include.

Finally, that output is piped to egrep again, and in this case we’re telling it to exclude output that matches the given patterns, separated by the | character. In this case, I know I don’t want the .DS_Store directory, or the .cache directory, and I haven’t used atom, WebStorm or vagrant in years, so I don’t want to bother copying those files.

Inside the do/done section, we use the copy command to copy each file from the list to a directory (previously created) called ‘dotfiles’ underneath my home directory. We use -r for recursive (so we copy dot directories and everything underneath them, not just the top level files), -p to preserve the permissions and -v so that we see output seeing the files as they are copied (otherwise the output from cp is silent).

Hopefully someone else finds this useful; if nothing else I will be referring back to this myself the next time I have to do this!

Initial Impressions of DirectTV Now

I’m a pretty happy user of Playstation Vue, especially since they recently released an AppleTV app.  But I can’t help but be tempted by the value proposition of DirecTV Now, particularly with their introductory offer, so I decided to sign up for the seven day free trial.

For me, it was great when I was streaming on my Apple TV in the mid/late afternoon. I also briefly tried the iOS app on my iPad and my iPhone.  After playing around for a few minutes, I left it playing in the background while I did some actual work.

No hiccups, until around 6:30pm, I got an error message about exceeding my streaming limit, even though the only stream I had running was on my Apple TV. I thought maybe the apps on the iPhone and iPad were still registering as connected somehow, even though they were no longer actively being used, so I force quit the application on both of those devices. The error message persisted.  Then, I force quit the application on my AppleTV and restarted it.

The first time I restarted the application, it reported that the service was “temporarily unavailable”.  I couldn’t do anything in the app at that point; there was no retry option. So I force quit again. This time it loaded up, and all seemed well, until a few minutes later when I got the error about exceeding my streaming limit again.

I discovered that if I switched channels, it would come back temporarily, but within a couple of minutes the error would reappear. The message referenced a particular error code to look up in their help center if the problem persisted. Unfortunately, all the help center did was basically repeat the error message: you can only have two streams active at a time. Duh.

I tried watching for another 15-20 minutes but finally gave up since the error kept reappearing every couple of minutes.  I switched back to my trusty PS Vue app for the night.

I’m glad they have a 7 day trial. I’m still on the fence. I love the value proposition and the number of channels (especially the +$5 for HBO which I pay $15/mo for now), but I really use the Cloud DVR a lot on PS Vue. I know they are supposedly adding a cloud DVR feature in “2017”.

Hoping that it was just capacity issues related to it being launch day.  We’ll see what day 2 brings.

Porting Cell Phone Number Verizon -> Straight Talk -> Google Voice

In an effort to cut costs, I decided to switch my cell service from Verizon to Straight Talk.  I would have done it sooner had I realized that I could use my existing Verizon phones with a Straight Talk SIM card.  I had assumed since Verizon was CDMA, and not GSM, that I would have to buy new phones to switch, but that turned out not to be the case.  

I verified my phone was indeed eligible and ordered a SIM card from their BYOP (Bring Your Own Phone) site.  Even though I’ve lived in Tampa over a year now, I still had my Atlanta cell phone number. My original plan was to establish service with a new Tampa number (time to get local!), and keep my old service active for awhile until I determined whether Straight Talk’s service was any good.  Then I could give people my new number, and discontinue my old service with the Atlanta number.  Seemed like a good time to make the switch.

The first hiccup in my plan was that in order to activate an already active phone on Straight Talk, you have to port your existing number from your current provider.  You can’t just take out the old SIM card and put in the new one.  They are very explicit about this in the activation process.  I was hoping to avoid the potential pain of the porting process, but it seemed there wasn’t really going to be any way around that.  Oh, well.

I started the activation process around 8pm, and hoped it would be done in a couple of hours.  It wasn’t.  When I woke up the next morning, Straight Talk’s website still indicated the porting process was “in progress”, with no additional details.  Around noon, it still showed “in progress”.  I finally initiated a customer service chat to make sure there weren’t any issues.

When you fill out the porting form with your existing carrier account information, one of the things they ask for is your billing zip code.  As it turns out, they don’t want your current billing zip code.  They want the billing zip code that you resided in when you created the account.  So if you moved at any point after establishing service with your original carrier, your port will get stuck.  But Straight Talk won’t tell you that.  (To be fair, I guess they would have eventually).  Straight Talk’s porting forms gives no indication of this, it just asks for your “billing zipcode”.  But the customer service rep stated this requirement as if it should have been obvious.

I had to think back to when I first established service with Verizon to remember what my zip code was.  I gave it to the rep, and apparently I guessed right!  She told me, very specifically, my port request would be “completed today at 3:37 PM EST”.  Pretty sure it was actually done a couple of hours before that.  Once it went through, my phone service was indistinguishable from when it had been directly with Verizon; it was just a lot cheaper.  The phone even still showed Verizon as the carrier, which makes sense, since Straight Talk is just reselling their network (as well as those of other carriers).

I still really wanted to get a local Tampa number. I found out that you have to order a new SIM card to do this.  After selling a bunch of stuff on eBay, I decided this would be a good time to finally upgrade to an iPhone 6+.  That way, I could establish the new number on my new phone, and keep the old service active on my old phone while I transitioned and gave people my new number.

So, I ordered a AT&T compatible GSM SIM card from Straight Talk, and when it was delivered, picked up my iPhone 6+ at the Apple Store.  That, by the way, was a smooth process.  I ordered the unlocked phone using the Apple Store app on my old phone, for pickup at the Apple Store.  Walked in, showed them my order with a QR code displayed by the Apple store app, showed them my ID, and they brought it right out and I was on my way.

But I digress!  This part of the process was much more straightforward.  I logged on to Straight Talk’s website, entered all the requisite info about the SIM card, and my phone was activated pretty much instantly.  The one thing that was a little disappointing was not getting any kind of choice on the number.  With some phone services (e.g. magicJack) you can pick from a list, or even request a specific number if it’s available, so you can pick one that’s easily memorizable, but with Straight Talk, you apparently just get whatever they decide to give you.

Now the conundrum:  what to do about my Atlanta number?  I set up call forwarding on that line to my new one, but that’s only a very temporary solution.  Obviously I wasn’t going to maintain two lines of service.  I gave my new number out to my family, but there are so many people that still have my old phone number from over the years.  What to do?

Then I wondered if you could port a cell phone number to a Google Voice account?  If I could associate my Atlanta number with a Google Voice account, I could just forward all the calls to my new number, and not have to pay for service for that old number.  I could also hold on to that number for a good long time!  Turns out you can!  Bingo!  I had an old Gmail account with an associated Google Voice number that I haven’t used in years.  It should be noted, Google does charge a one-time $20 fee for porting the number, which is refunded if it turns out they can’t complete the porting process for whatever reason.  You can even keep your original Google Voice number as well, if you want, for another $20.  Otherwise, it goes away 90 days after the porting process completes.

I did a few google searches to see what other people’s experiences had been, and then I threw caution to the wind and decided to go for it.  A couple of hours after I initiated the process with Google, I got a notification from them that there was a problem with my port.  They indicated that I had given an invalid account number.

Straight Talk didn’t show me an account number on the “my account” screen.  According to the Google searches I had done prior, if you had a BYOP SIM, the account number was the last 15 digits of your SIM card number and your billing PIN was “0000”.  I think that is probably true for GSM phones (e.g. AT&T or T-Mobile), but I finally found that since my phone was a CDMA phone, the account number was actually the IMEI or MEID number on my phone. (On the iPhone, you can find this in Settings -> General -> About).  I believe I entered the IMEI number; at least on my phone they were the same number, except the MEID number had one less digit at the end.  Also while reviewing this, I realized I had set a PIN on my Straight Talk account, so I used that instead of “0000”.

After resubmitting, I didn’t hear back from Google for awhile.  I did receive a call from (866) 667-6470, which I didn’t recognize, so I didn’t answer.  In my experience, these types of numbers are usually either telemarketers or bill collectors looking for somebody I’ve never heard of.  I usually google these numbers just to check, and it turns out this one is associated with Straight Talk.  But, they didn’t leave a message, so I didn’t do anything.  I checked my account on their website a little while later, and noticed where my Atlanta phone number used to display, it now showed the SIM card number instead, and labeled it an “inactive phone”.  Google, however, still showed the port in progress, and I checked, and still had service on the phone despite Straight Talk’s page claiming it was inactive.

Nothing else happened until the next morning, when I woke up I had an email from Google indicating the port was complete!  It took a total of about 22 hours from the original submission.  Mission accomplished!

Hopefully somebody else will be searching Google like I was, and find this information helpful!

My experience selling used items with Amazon’s “FBA”

I’ve got a lot of stuff lying around that I no longer use that I really need to get rid of.  Instead of using eBay or Craiglist, I decided to experiment with selling 3 items on Amazon using their “Fullfilled by Amazon” program.  One reason it really appealed to me in my zeal to declutter is that Amazon actually handles all the fulfillment, so you ship the items to them immediately, and the clutter is gone.  Once they make their way to the warehouse, Amazon can fulfill them with Amazon Prime, which you figure a buyer has got to love.  Finally, it seems like most of the sellers price their used items so high that it should be easy to undercut with the lowest price and still really feel good about the amount of money you’re getting, even after Amazon takes their cut.

First, let me say, it’s obvious that this program is really geared for people who are running a business with regular inventory.  As easy to use as the consumer facing Amazon web interface is, it is amazing just how clunky and baffling the workflow through the FBA interface is for a simple guy like me just trying to sell his stuff.  It’s truly awful.

I decided to start with three items.  Here’s what happened

  1. One item listed for $70, Amazon has designated as damaged by the carrier. Supposedly I’m going to get reimbursed for that at some point, but it’s not clear how much or when.
  2. Second item listed for $160 and sold relatively quickly, shipped to buyer Amazon Prime. This item was like new and in the original box. Two weeks later the buyer returned it to Amazon. Amazon has now designated it unsellable because it is defective. WTF? So now my only option is to have them send it back to me, and see if they guy really broke it, or what the deal is. Which of course I have to pay for.
  3. Third item listed for $30 sold after a few days, without incident (so far).

Amazon rocks for buying things and they get a much larger portion of each of my paychecks than they probably should, but as far as selling my used stuff, I’m thinking I need to stick with either eBay or Craigslist …

Surly LHT and Kona Dew Deluxe stolen [Brandon, FL]

Pisser of a day.  Discovered around lunch time two of my bikes were stolen out of my garage.  As far as I can ascertain, nothing else was taken, including my wife’s bikes.  Which makes me suspect it might have been a couple of people who took what they could easily ride off without drawing too much attention.

I’ve been having trouble with my garage door randomly opening, which I reported to my landlord weeks ago (Waypoint Homes: DO NOT recommend) but they haven’t been in any hurry to address it.  They’re that way with most issues, it seems, but you’d think this kind of problem would be a little higher on their list.  They’ve pushed us up on the priority list, so now they are going to take a look July 1st, but it’s a little late now.

To be fair, I am only assuming that they gained entry to the garage because of the door randomly being opened.  The times I’ve come home and found the door open, felt fortunate that nothing seemed to be missing.  I had hooked up a workaround using a remote AC adapter that would let me turn off the power completely to the opener to prevent this.  I can only assume at some point I either forgot to switch it off or the power off signal didn’t reach it without me realizing.

Anyway, I’ve filed a police report, and for whatever it’s worth, let me put this out on the internet.  I’ve heard miraculous stories of recovery, so it’s worth a shot…

The first bike was a Surly Long Haul Trucker/50cm frame/dark green.  It’s already fairly distinctive because you just don’t see too many of these out in the wild – they’re really made for long distance touring.  But it made a great commuter bike when I was back in Georgia.  It’s also distinctive because it not only has a rear rack but a front rack as well.  And it’s the disc brake version of the LHT, making it even rarer. Here’s a picture:

Pisser of a day.  Discovered around lunch time two of my bikes were stolen out of my garage.  As far as I can ascertain, nothing else was taken, including my wife’s bikes.  Which makes me suspect it might have been a couple of people who took what they could easily ride off without drawing too much attention.

I’ve been having trouble with our garage door randomly opening, which I reported to our landlord weeks ago (Waypoint Homes: DO NOT recommend) but they haven’t been in any hurry to address it.  They’re that way with most issues, it seems, but you’d think this kind of problem would be a little higher on their list.  They’ve pushed us up on the priority list, so now they are going to take a look July 1st, but it’s a little late now.

To be fair, I am only assuming that they gained entry to the garage because of the door randomly being opened.  The times I’ve come home and found the door open, I felt fortunate that nothing seemed to be missing.  I had hooked up a workaround using a remote AC adapter that would let me turn off the power completely to the opener to prevent this.  I can only assume at some point I either forgot to switch it off or the power off signal didn’t reach it without me realizing.

Anyway, I’ve filed a police report, and for whatever it’s worth, let me put this out on the internet.  I’ve heard miraculous stories of recovery, so it’s worth a shot…

The first bike was a Surly Long Haul Trucker/50cm frame/dark green.  It’s already fairly distinctive because you just don’t see too many of these out in the wild – they’re really made for long distance touring.  But it made a great commuter bike when I was back in Georgia.  It’s also distinctive because it not only has a rear rack but a front rack as well.  And it’s the disc brake version of the LHT, making it even rarer. Here’s a picture:

surly

The second bike was my original commuter bike, a Kona Dew Deluxe/53cm frame/black.  It wasn’t nearly as expensive of a bike, except that I had some super sturdy custom wheels built for it which cost almost as much as the bike did originally.  It’s also fairly distinctive because it has butterfly handlebars with red tape on them.  Here’s a picture from when I took it grocery shopping:

kona

If you have any information, please email me at e r i c —> ericasberry.com.  Alternatively you can contact the Hillsborough County Sheriff’s Office @ 813-247-8000, the case # is 14-364609 and the deputy who took the report is Romano.