Where Does Garmin Basecamp Download Updates on Mac OS X

I’m sorta obsessive about retaining a local copy of install files downloaded from the web. This includes applications’ auto-update files. Just because the vendor says that the new version is later and greater, doesn’t mean I’ll agree. Sometimes they delete features. Sometimes they add onerous restrictions.

I want to retain each install file so that I can roll back to any prior version I’ve used.

When Garmin Basecamp auto-updates on a Mac, it downloads the .pkg (not a .dmg) to ~/Library/Caches/com.garmin.BaseCamp/SoftwareUpdates

How to Name a Cell In Excel

  • On the same row as the formula bar (the bar that shows what you typed into a cell, when you select that cell), there’s a field on the left, which always shows the name of the cell you have selected. (e.g. A1, on a new spreadsheet)
  • This field with the name of the current cell is called the “Name Box”.
  • Every cell is named with its column/row name (e.g. A1) by default.
  • You can give the cell a new name (in addition to the column/row name) by clicking in the name box and entering a name of your choosing.

How to Create a Bell Curve (Frequency Distribution) Chart in Excel 2010

##Assumptions for this walk-through:

  • You’ve got a list of hundreds of values (e.g. 200).
  • You want to see those values in a small number of buckets (e.g. 10)
  • Your data actually fits a bell curve, where there are a few items in the lowest bucket, a few items in the largest bucket, and lots of items in the middle buckets.

##High-level Strategy:

  1. Get a column in Excel with your 200 numbers
  2. Decide how many buckets
  3. Get Excel to tell you the bucket boundaries (e.g. Values 1-14 go into bucket 1, values 15-29 go in bucket 2, etc.)
  4. Get Excel to give you the frequency distribution //as numbers//.
  5. Turn the distribution //numbers// into a distribution chart (histogram).

##Get a column in Excel with your 200 numbers

  • This is your job. You go get the data you want to chart, put it in a column, and come back to these instructions when you’re ready to proceed. I’m going to assume that you put this data into column A, beginning with row 2 (with a title in A1).

##Decide how many buckets

  • Statistics people call these buckets/chunks “bins”.
  • This walk-through will assume you want 9 bins. (Yeah, I said “10” up above. It is easiest to use an odd number of bins.)
  • Answer the question, “How many bins do you want below the mid-point?” With our example of 9 bins:
    • The 5th bin is the mid-point.
    • There are 4 bins below the middle bin and 4 bins above the middle bin.

##Get Excel to tell you the bucket boundaries (e.g. Values 1-14 go into bucket 1, values 15-29 go in bucket 2, etc.)

  • You need a list of the bins to be in a column. Excel will do this for you, using these instructions.
  • Calculate the average. Think about this first. You you really want to use average (i.e. the mean), or do you want to use median (the middle value). I’m going to use median, but if mean better suits your needs, use average where I’ve used median.
    • Assuming that your data is in A2:A201, and that nothing is in column B:
      • Put Average in B1.
      • Put =median(A2:A201) in B2. This will be the middle of your bell curve.
      • Name this cell ‘Average’.
  • Calculate the Standard Deviation. If you’re not a statistics guru, Standard Deviation answers the question, “How wide is each bin?” or “What’s the distance between the smallest value in bin 1 and the smallest value in bin 2?”
    • Assuming that your data is in A2:A201, and that nothing (other than what I’ve said above) is in column B:
      • Put Std Dev in B3.
      • Put =STDEV(A2:A201) in B4. This will be your standard deviation (the width of your bins).
      • Name this cell StdDev.
  • Put your bin count in column B:
    • Put Bin Count in B5.
    • Put your bin count in B6. In our example, it is 9.
    • Put Half Count in B7.
    • Put =FLOOR(B6/2,1) in B8.
    • Name this cell HalfCount
  • We’re going to put a list of your bins in column C. I assume you’ve got nothing else in column C.
    • Put Bins in C1.
    • In C2, put =Average-HalfCount*StdDev. This is your lowest bin.
    • In C3, put =C2+$B$4.
    • Copy C3 and paste it into C4 through [enough rows so that you have a value for each bin].
      • In our case, this would be 7 more rows (i.e. through row 10), giving us our total of 9 bins.
      • In your spreadsheet, if you copy from row 3, you’ll copy to row n+1, where n is your bin count.
    • Note: If your data is such that you don’t like the bins this gives you, make up your own bin limits, and override these. You just need the bottom value of each bin in a column.

##Get Excel to give you the frequency distribution //as numbers//.

  • If you don’t have it installed, install the Analysis ToolPak Excel Add-in. For Excel 2010:
    • File/Options/Add-ins. Manage: Excel Add-Ins. Press “Go…”
  • From the Data ribbon, in the Analysis panel (or the Tools menu, on older versions of Excel):
    • Choose //Data Analysis//.
    • Choose //Histogram//.
    • In the Input Rage, enter the range for your source data. (e.g. A2:A201, for our example).
    • In the Bin Range, enter the range for our bin values (e.g. C2:C10, for our example).
    • In Output Range, enter the name of the first cell where you’d like you histogram values to be written. (e.g. E2, if column E is empty, and you’re going to put “Histogram” as a title in E1.)

##Turn the distribution //numbers// into a distribution chart (histogram). * Select the cells of your histogram both the Bin and the Frequency columns. Include the “Bin” and “Frequency” titles and all the value cells. * From the Insert ribbon (or the Insert Menu on older versions of Excel), choose Scatter, then //Scatter with Smooth Lines and Markers// or //Scatter with Straight Lines and Markers//, depending upon your preference.

Backup Google Docs On a Mac

Here’s how I automate backup of my Google Docs documents on my MacBook, using GDocBackup and Mono. Similar magic also works for command-line backups in Windows, but you don’t need mono.

  • Install mono from http://www.mono-project.com/Mono:OSX. I went with v2.10.11 (Runtime).
  • Download xxx from http://code.google.com/p/gdocbackup/downloads/list
    • I downloaded GDocBackup_0.7.6.187_CMD.zip (The latest .CMD.zip.)
  • Unzip GDockBackup and copy the files into /usr/local/bin/
  • Smoke test it with mono /usr/local/bin/GDocBackupCMD.exe /help
  • mkdir /Users/kevin/backups/gdocs mkdir ~/etc mono /usr/local/bin/GDocBackupCMD.exe -mode=encodepassword -password=yourPasswordHere -outfile=/Users/kevin/etc/GDocBackupPassword
  • Put the following (edited for your neds) into ~/bin/backup-gdocs.sh #!/bin/bash # Use the following form to backup everything at you Google Apps mydomain.com domain: #/usr/bin/mono /usr/local/bin/GDocBackupCMD.exe -mode=backup -destDir=/Users/kevin/backups/gdocs -docF=odt -sprsF=ods -presF=ppt -drawF=png -appsMode=1 -appsdomain=mydomain.com -appsOAuthSecret=myAppsOauthDomainKey -username=adminuser@mydomain.com -password=adminPassword # Use the following form to backup your personal docs. Works in google.com account and in mydomain.com account. /usr/bin/mono /usr/local/bin/GDocBackupCMD.exe -mode=backup -destDir=/Users/kevin/backups/gdocs -docF=doc -sprsF=xls -presF=ppt -drawF=png -username=myname@mydomain.com -passwordEncFile=/Users/kevin/etc/GDocBackupPassword
  • RTFM at http://gs.fhtino.it/gdocbackup/quickguide-cmd
  • Schedule the script file to run daily using crontab.

If you like packaged software, take a look at http://www.goldenhillsoftware.com/ . It is reasonably priced, and it says it will back-up your Google Docs/Drive, Contacts, Calendar, and Email into Mac-usable formats.

Autofit All Rows In Excel 2010

In older versions of Excel, you used to be able to select a bunch of rows, right click on a row, and select Autofit. It would autofit all rows’ height. I can’t find this in recent versions of Excel. There must be a better way, but here’s my work-around.

Create a function that looks like this:

Public Sub Autofit_Selection()
    Dim I As Long
    Dim j As Long
    Dim s As String

    I = Selection.Row
    j = I + Selection.Rows.Count - 1
    s = CStr(I) + ":" + CStr(j)
    Rows(s).EntireRow.AutoFit
End Sub

Select the rows you want to auto-fit. Then run the macro.

How to Add Custom CSS to Drupal

I wanted to do some custom styling on a Drupal page. Since I use Markdown, I couldn’t just add CSS to the page’s HTML. I needed to tell Drupal to make a CSS file available.

  • Edit themename.info and add

    stylesheets[all][] = kpk-custom/kpk.css

  • Put stylesheets in /blah/sites/drupal/kpk-custom
  • cd to theme dir and

    ln -s /blah/sites/drupal/kpk-custom kpk-custom

Login to the site as admin, choose Configuration from the admin toolbar, then Performance, then Clear All Caches.

HTTP Server Error 502

Sometimes, when an HTTP server (e.g. Apache, IIS) returns a response code 502, it means that you used http://example.com and you should have used httpS://example.com.

Raspberry Pi Cases

Awhile back, I was looking for a Raspberry Pi case. I found limited selection. I bought two, and hated them both.

That has changed. Here’s a great list of cases:

  • http://elinux.org/RPi_Cases

Some I particularly like:

  • http://www.etsy.com/listing/111066753/injection-moulding-case-for-raspberry-pi
  • http://www.adafruit.com/products/859
  • http://www.adafruit.com/products/1326#Technical Details
  • http://www.adafruit.com/products/1123
  • http://www.shopavies.com/ixxocart/products/Pi_Pan_Raspberry_Pi_Aluminum_Case_w_Mounting_Option_FREE_SHIPPING-44-41.html
    • The “Pi Pan”. Pricey at $25. I ordered one.

New Version of Firefox Breaks Watir Testing and Browser Scripting

If you’ve told Firefox that it can auto-update itself, every time this happens it will break your Watir tests and/or browser automations. Because I use Watir to script Firefox to back up my Nirvana to-do data, this is a problem for me. Here’s what I do each time I notice that my backups are failing.

  • Go to https://code.google.com/p/selenium/downloads/list
    • Look and see what the latest version is. You want the one described as “The Java bindings for Selenium 2, including the WebDriver API and the Selenium RC clients. Download this if you plan on just using the client-side pieces of Selenium”
  • Find the “Gemfile” file in the folder where my backup script lives
  • Edit the file and update the version info on the selenium-webdriver line to the latest version number from the selenium downloads site.
  • In the folder with Gemfile, run “bundle update selenium-webdriver”
  • Then manually re-run your failed test/script. (Mine is