October 02, 2015
| posted in:
I have never been a good speller, therefore I rely on spell check to help ensure that my writing doesn't contain basic spelling errors. Most modern software that is centered around text provides spell checking. However I do most of my writing, including all of the posts on Zanshin.net, using Vim - a decidedly un-modern text editor.
Fortunately Vim is incredibly flexible and it is relatively straight-forward to enable spell checking.
Enable spell checking
You can turn spell checking on or off with
The default language used is US English. You can change this to another language with
The above example sets the language to British English.
.vimrc I have a number of file type specific settings, including spell checking. I only enable spell checking for a limited number of file types, as spell checking code isn't very useful. The three
autocmd entries I have are:
autocmd FileType mail setlocal spell spelllang=en_us
autocmd BufRead COMMIT_EDITMSG setlocal spell spelllang=en_us
autocmd BufNewFile,BufRead *.md,*.mkd,*.markdown set spell spelllang=en_us
The first is for when I'm using mutt for my mail - it turns spell checking on while I'm composing or replying to messages. The second activates spell check for Git commit messages. The last autocmd set spelling on for Markdown files.
Your own dictionary
It is possible to add words to your own dictionary using the
zg key combination. You can undo the add with
zug. It is also possible to mark a word as incorrectly spelled using
zuw undoes the incorrect marking.
Find misspelled words
You can jump forwards or backwards through the buffer to the next flagged work using
Once you've located a word,
z= will bring up the list of suggested words, pick the associated number and press return and the new word will be substituted in for the old one.
All of this and more can be found in the Vim help pages
October 01, 2015
| posted in:
Previously I had written about how to change the sshd port for Mac OS X Lion and Mountain Lion. The basic premise is still the same, but the introduction of El Capitan's System Integrity Protection (SIP) requires a slightly altered approach to having sshd running on an alternate port.
In a nutshell the controlling plist,
/System/Library/LaunchDaemons/ssh.plist, can no longer be edited. So instead you need to make a copy of this file and store it elsewhere. In my case I put it in
/Library/LaunchDaemons. Then using
launchctl you can cause your new plist to be started whenever the computer is booted. The detailed steps follow.
Create a copy of the plist
sudo and rename it to
ssh2.plist. The renaming is important, otherwise
launchctl won't discriminate between your plist and the official one, which will result in your alternate port not being visible.
$ sudo cp /System/Library/LaunchDaemons/ssh.plist /Library/LaunchDaemons/ssh2.plist
A new Label and a new port number
There are two changes to make in the plist. First it needs a different label to distinguish it from the original, and second it needs to specify the alternate port you wish to use.
Provide a different Label for the plist by changing this:
Setting the port number to your alternate by changing the SockSeviceName string (
ssh) to the port number you want to use. In other words, change this:
99999 is a valid port number.
Activate your new sshd port
launchctl you can launch a new instance of the sshd daemon, one that listens to your alternate port. The
launchctl command to do this looks like:
$ sudo launchctl load -w /Library/LaunchDaemons/ssh2.plist
If you ever wanted to unload this plist, run this command:
$ sudo launchctl unload /Library/LaunchDaemons/ssh2.plist
To verify that your new port is being listened to, run
$ netstat -at | grep LISTEN
Your new sshd port should be listed.
As always, making changes to the murky innards of your operating system and its supporting configurations can be risky. Make copies, backup before making changes, and proceed with caution. It is worth noting that this setup does not turn off port 22, it merely allows access on an alternate port. The machine I did this to is behind my employer's boarder and firewall which blocks port 22 traffic.
I made use of the following resources for this posting.
August 30, 2015
| posted in:
With a new 2016 MINI Cooper S making its way to me I've been thinking a lot about cars lately. The Cooper S has a reputation for being quick and nimble. It boasts a sub-seven second zero-to-sixty time. I was curious how the MINI compared to the other cars I've owned. Some Internet searching and a spreadsheet later and I had my answer.
|1992||Lexus ES 300||2959||3362||185||195||18.17
|2000||Lexus ES 300||2995||3351||210||220||15.96
|2001||Audi TT Coupe||1781||3208||180||173||17.82
|2001||Lexus LS 430||4300||3955||290||320||13.64
|2016||MINI Cooper S||2000||2785||189||207||14.74
With the exception of the 2001 Lexus LS 430, the MINI Cooper S has the best power-to-weight ratio of any car I've owned. The 430 had a monster 4.3 liter engine, more than twice the size of the MINI's 2 liter engine, but it's also roughly 1200 pounds heavier. I think the MINI will feel faster, and it'll certainly corner better.
The best power-to-weight ratio vehicle I've ever owned was a 1987 Suzuki Katana 1100F. With a dry weight of 537 pounds and 136 horsepower, it's ratio is 3.95 pounds-per-horsepower. Incredibly fast with instant acceleration at any speed. Not much fun in the winter though, and no room for a cello.
August 16, 2015
| posted in:
I bought my first car 32 years ago, and I am buying my 11th car in a few weeks. Here is a list of all the cars I've owned.
- 1984 Pontiac Fiero
- 1987 Honda Prelude
- 1992 Mazda Navajo
- 1994 BMW 318i
- 1992 Lexus ES 300
- 1999 Nissan Altima
- 2000 Lexus ES 300
- 2001 Audi TT Coupe
- 2001 Lexus LS 430
- 2010 Honda Insight
Car number 11 will be a 2016 MINI Cooper S in Volcanic Orange with a black roof and mirror caps. The car has been built and is currently be loaded on a ship for transport to the US. The dealer thinks I'll have it by early September.
For completeness sake I've also owned three motorcycles.
- 1986 Yamaha Riva 180
- 1988 Yamaha Radian 600
- 1988 Suzuki Katana 1100F
August 13, 2015
| posted in:
Buying a car can be stressful. It's a lot of money and, unless you are very well off, a financial obligation for years to come. American dealerships have a checkered past when it comes to the whole buying experience. Everyone has heard horror stories of hours-long slogs through high-pressure sales tactics. Buying our 2016 MINI Cooper S involved none of that.
The MINI USA website has a wonderful Build and Price a MINI tool that lets you select the model car you want and then tweak endlessly the options, packages, and dealer add-ons you desire. Best of all you can save these builds in your own online garage for further tweaking later.
As a part of the saving process you can produce a PDF file with all the details of your MINI -- interior and exterior options, colors, fabrics, wheels, you name it -- and a specifications sheet that lists the cryptic dealer codes for those options. After days (weeks, really) of tweaking and tuning, I had the set of options I wanted. With an email to the dealer I was able to initiate a new car order, I just attached the PDF.
The dealer sent me a deposit authorization form that I filled out and faxed back, along with my credit card number, and the car was ordered. No pressure, no hassel, no "what will it take to get you into this car today" tactics. After the order was placed the saleswoman sent me a scanned copy of the order to confirm the vehicle was what had been ordered. Except for the delivery time (6 - 8 weeks) it was almost Amazon-like. One-click, prime delivery cars would be amazing.
We did make a trip to the dealer about 10 days after the order was placed to have our trade-in appraised and to ask some questions about finance options. The dealer was informative and casual, no pressure whatsoever.
In (hopefully) a few weeks the car will be delivered and we'll make a final trip to sign papers and collect our new MINI. Concluding the easiest new car purchase I have ever made.
August 12, 2015
| posted in:
Updated: 8/21/2015 - En Route status reached
Updated: 9/2/2015 - At Vehicle Distribution Center status reached
Updated: 9/8/2015 - At Your MINI Dealer status reached
After a lot of shopping we've decided to get a new car. We're replacing our 2010 Honda Insight with a 2016 MINI Cooper S. To say that I am excited by this is an understatement. Ever since the "new" MINI was released in 2000 I've been a huge fan, and, after test driving one last November, I haven't been able to stop dreaming about one.
I'll write more about the MINI itself after it gets here, right now I'm having fun with the MINI Owner's Lounge website, which allows you to track your car's progress through the building and delivery process. Currently our MINI is "awaiting transport". Here are all the statuses, in order.
On Order - July 23, 2015
Welcome to the MINI clan. The order for your new MINI is in and waiting to be scheduled for production While you await the day that you will be united with your MINI, you can come back here to check on how it's doing and what stage of the process it has reached.
Scheduled for Production - July 29, 2015
Your MINI has been scheduled for production and will begin to move through the "birth canal" at our Oxford plant, one of the most modern and advanced production plants in all of Europe. With out extremely rigorous quality control standards in place, you should rest well knowing that your baby is in the best of hands.
Awaiting Transport - August 11, 2015
Congratulations! Your healthy and handsome new MINI has been built. A wee bit heavy for any stork, your MINI will now be loaded onto a ship to make its way across the pond. At night, we're sure it'll be dreaming of tearing through twisty turns with aplomb and glee.
En Route to Vehicle Distribution Center - August 21, 2015
Though still adjusting a bit to its sea-wheels, your new MINI wants you to know that so far the cruise has acutally been a blast - great buffets and lots of partying with its brothers. But still, your MINI can't wait to dock, hit the road, and chew up solid ground again.
At Vehicle Distribution Center - September 2, 2015
Your MINI has arrived on U.S. shores and is going through one of its final stages of training and qaulity control at a MINI Vehicle Distribution Center. The center servers as yet another chance for a comprehensive, bumper-to-bumper inspection. It's also where your MINI will be taught not to make fun of Americans who call the "bonnet" a "hood" or the "boot" a "trunk".
At Your MINI Dealer - September 8, 2015
Your MINI is now being transported to your MINI Dealer. We know it's hard, but please be patient just a bit longer. Once it arrives, your dealer wil give it one last shine and a clean bill of health. Then they will call you and set up a time for you to stop by and happily head home in your new MINI.
Last weekend we visited the MINI dealer and learned that our MINI was nearly through the construction process, so I was pleased to get the "awaiting transport" status last night. The dealer said that the usual trans-Atlantic trip is three weeks. I'm hoping that time includes the "awaiting" and "vehicle distribution center" portions of the process. She thought we'd get the car in early September.
Is it September yet?
July 18, 2015
| posted in:
My wife and I are contemplating getting a new car. Last weekend and again today we did some test drives. At the first dealership we visited today we had a very good, low-key experience. The salesman met us in the lot, answered our questions, and wasn't overly pushy. Nor did he try to be familiar or ingratiating. After making a copy of a driver's license he let us test drive the vehicle we were interested in.
At the second dealership we had to go inside to find someone, and were then lead to a pint-sized office where a mild interrogation began. Where did we live? Would we be buying the vehicle together or just one of us? After giving the salesman my phone number I watched him access some kind of public records database service to pull up information about me. When he tried to circle back around to the finance question again, I explained that I knew he had a boss and a script, but that we were only interested in test driving a vehicle and that all the other items on his list could wait. He relented and got us a demo model to drive.
One of the dealers was Nissan (where we drove a Rogue) and the other was Ford (where we drove an Edge and an Escape). Prior today I would have bet money, upon hearing a tale like this one, that Ford was the invasive dealer and the Nissan was the low-key one. It was exactly the opposite. Ford was relaxed and pleasant while Nissan felt invasive and heavy handed.
As a member of the information technology industry I am very well acquainted with the idea of user experience. Car dealerships have a history of very poor, adversarial, user experiences. Particularly American marquee automobiles. After today's experience I am ready to believe that American car companies have improved their approach to treating customers, and that the off-shore brands are falling behind.
At least for the two dealerships we visited today, the Ford dealer beat the Nissan hands down for the user experience.
April 11, 2015
| posted in:
After getting up at 2 am on Friday to purchase a 42mm Space Gray Sport Watch with the black band, I scheduled an appointment to see the Apple Watch in person for Saturday at my nearest Apple Store, some two hours drive away.
This was my first time buying an Apple product at the moment of its release and I made a tactical blunder that cost me about 2-4 weeks delivery time. I forgot to change the credit card on my Apple account ahead of time and therefore had to make that change at 2:01 am when the store came back up. At first I tried to make this update via my iPad Air 2, but I couldn’t get past the phone number formatting, so I ended up wasting more time doing it on my laptop.
My order was placed at 2:09 am and already the shipping date had slipped from April 24 to at least May 13. I will be taking pains to have my account ready ahead of time this autumn when the new iPhone goes on sale.
The Country Club Plaza Apple Store was fairly crowded when I arrived about 15 minutes early for my try-on appointment. However I only had to wait a few minutes before I was led over to the side of the store for my trial. I requested to see a 42mm Sport watch with the black fluoroelastomer band, and one with the leather loop band. The Apple Store employee (whose name has escaped me) first put the sport band watch on my arm and then had my double-press the button on the side of the watch. This started a preprogrammed demo of the watch. The demo was not interactive, but did show off the watch’s interface and taptic capabilities.
Next he put the leather loop band on. It was fastened to a stainless steel watch. I had read some reports that the leather loop wasn’t as soft was advertised, and while I agree it isn’t the most supple leather in the world, I liked how it felt on my wrist.
Holding the two watches, one in each hand, I could discern that the stainless steel one is slightly heavier, however in the brief period of time that I had them on, I really couldn't tell that it was heavier. After trying the Sport model on with the fluoroelastomer band I was convinced I had made the right purchase choice. I am very tempted by the leather loop band and will likely order one of those. The sport band has a small metal post that holds the band in place and I'm worred that it will mar the wrist rest on my MacBook Pro. The leather loop band has no metal that would mar the laptop. However I may wait until I have the watch to purchase a second band for it.
I asked about the strength of the taps on the wrist, could they be adjusted. The clerk didn’t know. Later, when I was exploring the demonstration watches embedded in a little stand with a screen to explain various features, I discovered a setting that would make some taptic taps stronger.
I also asked if the bands could go on the watch either way. I.e., could the two halves of the band be attached to either the top or the bottom of the watch. That answer is yes. Also, in the settings you can specify which wrist the watch is on, left or right, and which side the crown is on, left or right. You could set up the watch on either wrist with the crown on the elbow side or the hand side. On the elbow side you’d use your thumb on the crown, whereas on the wrist side you’d use your forefinger on the crown.
The crown is amazing. It has a wonderfully smooth action, that has just the right amount of drag. Pressing it once takes you to the home screen. Pressing it twice in succession lets you bounce back and forth between the last two apps you visited.
After my trail fitting was over I spent a good 30 minutes exploring all the apps on the demo watch. Not everything was turned on. Those things that required being mated with a phone (remote camera features) were not enabled. I was most intrigued by the fitness apps. I wear a Fitbit Flex and I am very interested to see how the activity tracking the Apple Watch provides compares to the Flex.
I have wanted an Apple Watch since they were announced last autumn, and after trying a couple on today and after exploring the demo watch, I am even more anxious to have one of my own.
February 20, 2015
| posted in:
Zanshin.net is 19 years old today.
$ whois zanshin.net | grep Creation
Creation Date: 1996-02-20T05:00:00.00Z
I've lost track of the number of major revisions my site has had in that time, but I do know that it has gone from hand-coded to Blogger to MoveableType to Wordpress to Octopress and finally to Jekyll.
In addition to the main domain, there are three subdomains. Geek a semi-frequently updated link-list of technology sites. You can drag-and-drop the sections. Books is a listing of all that I've read this year. Includes audiobooks too. And Health is a record of my daily exercise, calories, and weight.
In terms of numbers there are (approximately) 653,754 words in the postings (not counting this one), and this post will be number 2,158. The site's readership has steadily increased each year now for several years. Currently I average about 550 visits per day or 14,000 per month, give or take.
Here's to another 19 years.
February 05, 2015
| posted in:
Introduction and Motivation
This is the fourth part in a series on dual booting Arch Linux and Mac OS X on a MacBook Pro. This part covers setting up Xorg, getting the Nvidia graphics sub-system working, and installing Gnome and Awesome. At the end the is a bibliography of some of the many sites I used as references. Part One covered creating a bootable USB drive with the Arch Linux installer. Part Two discussed how to prepare the MacBook Pro. Installing the base Arch Linux operating system and getting the dual boot between Arch and OS X working was covered in Part Three.
My day job has transitioned to system administration and infrastructure automation (Chef!). All of our virtual infrastructure (with rare exceptions) is based on Linux so I am keenly interested in learning more about its underpinnings. Setting up Arch Linux and sorting through its configuration challenges seems like a good way to jump into the deep end of the Linux pool.
Arch Linux on a MacBook Pro Part 1 - Creating a USB Installer
Arch Linux on a MacBook Pro Part 2 - Preparing for Dual Boot
Arch Linux on a MacBook Pro Part 3 - Base Installation
Arch Linux on a MacBook Pro Part 4 - System Configuration
You need to download the proprietary Broadcom driver, and then make a package, and finally install the package. (I did this under the chroot used to setup Arch, but didn't test it until the base install was completed and I was logging in via my account. Consequently you may need to use
sudo for some of these commands.)
$ mkdir src
$ cd src
$ wget https://aur.archlinux.org/packages/br/broadcom-wl/broadcom-wl.tar.gz
$ tar xf broadcom-wl.tar.gz
$ cd broadcom-wl/
$ makepkg -s
Note: If you are doing this under the
chroot you'll have to
su to the user account you created earlier to run the
Next use the
packman command below to install the newly made package.
$ pacman -U /tmp/usb/broadcom-wl-188.8.131.52-4-x86_64.pkg.tar.xz
After the package installation, load the kenel modules necessary for WPA2 connections
$ modprobe wl lib80211_crypt_tkip
Finally use the
wifi-menu command to connect to a wireless network. Note: you may have to install some dependencies via
pacman -S <dependency>.
In order to make the library of 64-bit wrapped 32-bit applications available edit
/etc/pacman.conf and uncomment the
multilib lines. Then update the system using:
Next install all the basic utilities needed to build 32-bit or 64-bit packages.
$ sudo pacman -S multilib-devel fakeroot git jshon wget make pkg-config autoconf automake patch
enter to install all members in
group multilib-devel. And say yes to removing those packages in conflict.
The "Arch User Repository" is a user-managed package repository with a huge number of packages. To access it install
packer, which uses the same command syntax as
pacman. I create a
src directory in my home to hold such things as this.
$ mkdir src
$ cd src
$ wget http://aur.archlinux.org/packages/pa/packer/packer.tar.gz
$ tar xf packer.tar.gz
$ cd packer
$ makepkg -s
$ pacman -U packer-20140817-1-any.pkg.tar.xz
ALSA works out of the box with Macs so install it via:
to control the speakers. Make sure to disable channels for speakers you don't have. Test your speakers with
2 is the number of speakers.
Setting up Xorg will enable your video card, trackpad, backlight, et etera.
Install the base packages for Xorg, using:
$ sudo pacman -S xorg-server xorg-xinit xorg-server-utils xorg-server-devel mesa.
Note that the mesa package is included for 3D support, if you do not have a 3D capable graphics card you can skip this package.
Getting the NVIDIA card working was the hardest part of the install for me. In the end I used the Nouveau driver as the Nvidia ones didn't work. Follow the instructions on the Nouveau page and you should be okay.
At this point you will need to reboot your machine to load the proper kernel modules and module blacklists.
There are lots of choices in each of the three major desktop manager categories (stacking, tiling, and dynamic). To try something completely different I decided to install Awesome as well as Gnome.
Awesome didn't so much work out of the box, so I installed Gnome.
$ pacman -S gnome gnome-extra
It will install lots of packages which, depending on your download speed, may take a while.
$ sudo systemctl enable gdm.service
will set Gnome to start when you boot your computer.
One of the many postings I used to figure all of this out talked about Awesome, and since I'd never seen it before I thought I'd give it a try.
Start off by getting some fonts:
$ pacman -S ttf-dejavu ttf-ubuntu-font-family
Then install awesome from the official respoitory.
Now you can select which desktop environment you want when you sign in, either Gnome or Awesome. You'll want to read the Awesome wiki and documentation, as out of the box it provides no configuration.
I've only scratched the surface of configuring and using Arch Linux. But I now have a capable machine running both OS X and Arch with which to learn.
I relied heavily on a large number of websites to figure all of this out. These are the most heavily used.
Dual Boot Arch Linux on MacBook Pro Installation
Arch Linux on MacBook Pro Retina 2014 with DM-Crypt, LVM and suspend to disk
Arch Linux: System Installation
Arch Linux: From Post-Install to Xorg
Disable clearing of boot messages
root partition read only after update systemd
Failed to start Remount Root and Kernel File System (systemd)
Blkid returns nothing, but has no error
I highly recommend reading the Arch Beginners's Guide. The
#archlinux IRC channel is vibrant and can also be a source of help.
If you've gotten this far in the series and or if you've successfully (or not) tried to dual boot a MacBook Pro with Arch, I'd love to hear from you. You can reach me via email link in my sidebar.