Reset Mac OS X Dictionary

I’m heavily reliant on the Mac OS X spell checker, but I sometimes click Add to Dictionary instead of the correct spelling. For obvious reasons, that isn’t good, so it’s helpful to know where those new words are stored. Here’s an example:

Screen Shot 2016-09-01 at 10.22.04 PM

You can view the custom dictionary by opening Finder and navigating to:

Users/USER_NAME/Library/Spelling/

In that directory, you’ll see an en file and a LocalDictionary file. You can open each of those files with the TextEdit.app and view the words that were added to the dictionary. Embarrassingly, my Local Dictionary file currently looks like this:

Screen Shot 2016-09-01 at 10.33.01 PM

Delete any unwanted words and save the file. The changes will take effect once you reboot.

Current as of Mac OS X 10.11.6 (El Capitan)

AppleScript – Executing JavaScript in Safari and Chrome

I haven’t used AppleScript much, but I was recently working on scripts to automated workflows and I was surprised to discover that each browser uses different commands to execute JavaScript.

Specifically, Safari uses do JavaScript "add code here" in document X and Chrome requires execute javascript "add code here"

Here’s an example of each:

Safari

tell application "Safari"
	open location "https://google.com"
	if (do JavaScript "document.readyState" in document 1) is "complete" then set pageLoaded to true
	display dialog pageLoaded as string
end tell

Google

tell application "Google Chrome"
     open location "https://google.com"
     if (execute javascript "document.readyState") is "complete" then set pageLoaded to true
     display dialog pageLoaded as string
end tell

A couple notes:

  1. AppleScript.app autocorrects the second example to a lowercase JavaScript, but either should work.
  2. Safari requires that a document is specified
  3. If you’re using Firefox, it’s currently not possible to execute JavaScript with AppleScript

Man-Made Wave

Man-made waves have existed for many years (as seen in the classic 80’s movie North Shore), but most of us doubted that we’d ever see anything that resembles a real wave.

Kelly Slater’s company has been working on creating a man-made wave for years and they recently released a video of a wave that shows a lot of promise.

Below is a video of Josh Kerr on one of his first waves in the new wave pool.

Rumor has it that the wave pool is in the Fresno area. That’s only a couple hours from where I live, so I hope the rumors are true.

They haven’t released any other other details, but it’ll be interesting to see how they structure the pricing and control the crowds once it opens to the public.

Only the Essential: Pacific Crest Trail Documentary

Yet another Pacific Crest Trail (PCT) documentary to add to your list: Only the Essential: Pacific Crest Trail Documentary

The film was created by Casey Gannon and Colin Arisman during their 2013 thru-hiked of the Pacific Crest Trail.  The film is short (less than 40 minutes) and does a great job of capturing the spirit of the trail.

The narrator’s voice was a bit monotonic and some of the stop motion videos were nauseating, but overall I enjoy it. They captured some amazing footage of desert and the mountains and it was refreshing to see their enthusiasm throughout the journey. Even though hikers are documenting their trips in increasing numbers, I still enjoy watching most of them and see new facets of the trail in each one.

It’s embedded below, but you can also check it out on the Wild Confluence Films site.

Backpacking Documentaries

I’ve watched a lot of backpacking documentaries, but I think I have a new favorite: Do More With Less | A Conversation About The Pacific Crest Trail. I highly recommend it if you have any interest in backpacking or the Pacific Crest Trail. Here’s the full video:

Next up on my list is Tell it on the Mountain. The video download costs $15, but here’s a trailer:

If you have any favorite hiking or backpacking documentaries, please let me know.

Chrome Redirect Cache

I recently created a new site, but I visited the domain before the site and was redirected to a cgi default page. And as a result Chrome cached the URL as http://example.com/cgi-sys/defaultwebpage.cgi

After I got the site up and running, Chrome continued to redirect the domains to the cgi default page even though it was working properly in other browsers and an incognito Chrome window.

After a week or so of this annoyance, I searched the web for a solution and I found one on Sal Ferrarello’s site. It turns out that Chrome caches redirects and there isn’t a clear way to clear the redirect cache.

The solution that worked for me was Sal’s first idea to disable the cache from the Chrome Developer Tools. The easiest way to open the Developer Tools is Command Option I

Once the Developer Tools are open, click on the settings icon shown here:

Once the settings modal opens, check the box next to Disable Cache (while DevTools is open) option as shown here:

disable-cache

Now visit the page that is cached and the old redirect cache should be permanently removed.

Check out Sal’s post for more details.

Unnecessary Medical Care

A few years ago Atul Gwande wrote about the medical cost conundrum in the U.S. He follows up on that article with Overkill. This article is an in-depth look at the harm caused by unnecessary medical care.

I’ve become cautiously skeptical of most medical advice and this article reinforces much of my skepticism.

Here are a couple of interesting quotes from the article:

Doctors generally know more about the value of a given medical treatment than patients, who have little ability to determine the quality of the advice they are getting. Doctors, therefore, are in a powerful position. We can recommend care of little or no value because it enhances our incomes, because it’s our habit, or because we genuinely but incorrectly believe in it, and patients will tend to follow our recommendations.

The forces that have led to a global epidemic of overtesting, overdiagnosis, and overtreatment are easy to grasp. Doctors get paid for doing more, not less. We’re more afraid of doing too little than of doing too much. And patients often feel the same way. They’re likely to be grateful for the extra test done in the name of “being thorough”—and then for the procedure to address what’s found.

Craigslist

One of my favorite things about Craigslist is the Free Stuff section. For the past six months we’ve had some old glass shower doors sitting in our garage. I finally took a picture and put them on Craigslist and within a couple hour five people contacted me asking for more details. And by the next day they were gone.

Over the last couple years we’ve gotten rid of old BBQs, rusty bikes, and other odds and ends. It easier than throwing something away in a dumpster and I’m glad someone else is getting more use out of our old junk.

Karma Mobile WiFi

Karma Logo

My brother-in-law turned me onto a WiFi hotspot device called Karma that’s being released in December. I work on the road a few weeks a year and if Karma works as advertised, I’ll be able to work in my car and I won’t have to rely on abysmally slow hotel/airport/cafe WiFi networks.

Karma previously sold a WiFi hotspot, but it didn’t run on LTE networks. Their new device is set to be shipped in December and can be pre-ordered now. If you pre-order one today you can get it for $99 instead of $149. And if you use this link you’ll get an additional $10 off (and I’ll get $10 of data credits):

https://yourkarma.com/invite/kevin23643

Other Details
– No contract
– Pay as you go data – $14/GB
– Runs over the Sprint LTE and CDMA network (view coverage)
– Your Karma connection is shared with other Karma users
– If other Karma users use your connection you get data credits

Karma kind of downplays the security risk of sharing a network connection, which concerns me a bit. Here’s a related response from one of Karma’s employees:

In order to minimize the security risk, I’ll just use a proxy or VPN whenever I’m connected to a Karma device.

I’m really looking forward to using it and I’ll add a review once I get a chance to use it.

Removing Game Center from OS X Yosemite

Screen Shot 2014-10-16 at 8.53.49 PM

October 16, 2015 Update: If you’re running OS X 10.11 (El Capitan), you’ll need to disable the System Integrity Protection functionality if you want to hide or remove Game Center.

One of the first things I noticed when looking around OS X 10.10 (Yosemite) was the Game Center icon in the Applications folder.

Game Center has been in Mac OS X since 10.8 (Mountain Lion), but the icon recently changed to match the bubbly iOS icon:

Screen Shot 2014-10-20 at 10.30.59 PM

I never really use Game Center on iOS and am always annoyed with the spammy friend requests. I’ve turned off Game Center friend requests multiple times, but it always seems to get turned back on.

Once I saw Game Center in Yosemite, I immediately tried to drag the icon to the Trash. No luck:

Screen Shot 2014-10-16 at 9.08.37 PM

It took a couple minutes, but I figured out how to remove it. Here’s how your remove Game Center:

Warning! Don’t do this unless you’re comfortable with the command line and have a recent backup of your hard drive. If you don’t know what sudo means, then please don’t proceed. A simple mistake with sudo rm could cause major issues.

– Open Terminal
– Navigate to the Applications folder
– Enter the following:

sudo rm -rf "Game Center.app"

That’s it!

After removing Game Center, I restarted my computer. Game Center didn’t reappear and everything is seems fine. So far. There are probably some ramifications if you try to play Mac App Store games that support Game Center, but I’m not sure. And now I’m wondering if Game Center will reappear then next time I update OS X. Regardless, it’s nice to be rid of that extraneous icon 🙂

Otherwise, I really like Yosemite. It’s really snappy (on a wiped 2012 MacBook Air).