Brandon Bohling

Forgotten Step

Even though I have probably set up a new Mac at least a dozen times in the last few years I keep forgetting the most basic step in the world of Terminal…creating a .bash_profile and adding an export path. This is key because it tells Terminal where to look for executable binaries. Hopefully writing the steps down will make sure I never forget this again.

  1. Open TextEdit (or your favorite text editor)
  2. Add export PATH="$HOME/bin:$PATH" on the first line
  3. Save in your home directory (~/) as .bash_profile
  4. If Terminal is open, restart it

If you really want to become a command line junky check out these dotfiles.

Parallels and Visual Studio Issue

After months of experiencing Visual Studio 2012 (running inside Parallels on my Mac) hanging when trying to exit out of the app I took a few minutes to look for a fix. Within a couple of minutes I came across this thread which contained the solution to the issue. Based on the thread it seems like the root cause of this issue is that I am working on solutions that are stored on my Mac, \\psf\Home\pathToSoltion rather than working on solutions that are on the Windows (VM) C drive. Supposedly the Parallels team is aware of the issue and working on a fix, but you can fix it today within two minutes. Simply create a symbolic on the Windows VM.

  1. In Windows, run a command prompt as administrator (Start, search for command prompt, right-click, run as administrator)
  2. Type the command: mklink /D "c:\mac" "\\psf\Home"
  3. Hit return
  4. Now open solutions using c:\mac\pathToSolution

That’s it. I only wish I would have looked for this solution months ago.

Android’s Drop Down Bug

On and off for several days now I have been trying to fix an issue where a drop down list (<select> tag) seems to be disabled on old (version 2.x) Android devices. Apparently this is a known bug with plenty of suggested fixes. Not a single one (or combination) worked for me. I even came across this suggestion since we are using iScroll, but it did not help either.

What was my solution?

Wanting to rule out any jQuery or Knockout issues, I added a simple, hard-coded drop down above the one I was having issues with:


And to no surprise, it did not work…however, now my original drop box did work! Unfortunately I cannot explain it nor can I take the time right now to figure it out, but I thought I would share anyway.

Obviously I could not have a random drop down on the screen so I just hid it using the following:

#oldAndroidSelectFix { left: -9999px; }

<select id="oldAndroidSelectFix">

If you run into this issue I encourage you to start with the official bug report: Android Issue 10280: browser - inactive dropdowns. There are several steps to try before using a horrible hack like mine.

Remove Day Part of Date in URL

Since everyone is talking about shipping these days tonight I took the plunge and released my modified blog on a new server. I have been dreading this day because a) the redesign is incomplete and b) there are so many steps in cleanly moving a domain between providers. Of course, immediately after “flipping the switch” I realized that my old website used URLs like /2011/09/25/Ellie/, but my new configuration was setup to use /2011/09/Ellie/ (notice I no longer have a day in the URL). Crap.

No sweat, right? I knew .htaccess could handle such an easy task. The problem was (being an .htaccess novice) I did not know the exact syntax to use. Worse, all the samples I could find simply showed how to strip out the entire date, not just the day. Thankfully, I finally came across this post where Alan Levine describes exactly what I needed to do in this paragraph:

The first part instructs the web server to return a permanent redirect (301) to find anything that has the three numbered structure (e.g. yyyy/mm/dd/) and find all the stuff that comes after that (.*) – every set of patters in (…) corresponds to variables we can use in the result– $1 $2 $3 are the year, month, day respectively, and $4 is the string of the url we want to preserve.

Simply adding the line below in the .htaccess fixed the issue:

RedirectMatch 301 /([0-9]+)/([0-9]+)/([0-9]+)/(.*)$$1/$2/$4

Like I said, “No sweat”.

An Event Apart

AEA San Diego

I just spent the last few days in sunny San Diego. Instead of enjoying the outdoor activities though, I was in a large room with hundreds of other people learning about the latest in standards-based web design. The conference, An Event Apart (AEA), had twelve top-notch speakers including Jeffrey Zeldman and Eric Meyer who started the conference. In my 18 years of being a professional web guy I have been to many conferences, but without a doubt AEA was my favorite…even better than WWDC. The mix of designers and developers was refreshing and given the limited number of attendees (~400) it was easy to talk with many. There were no “tracks”, simply one room, so no making tough choices on which sessions to attend. And the content. Not a single session was a snore fest. All the speakers presented beautifully engaging slides, sharing knowledge and best practices through stories, something I rarely experience in my day job.