Gymkhana Five: San Francisco ⧁


I particularly like the airborne sideways drift at the 5:40 mark.


What Is the Higgs Boson? ⧁


An explanation that (almost) makes you think you understand the Higgs. Almost.


Change SSHD Port on Mac OS X Lion


Updated: May 1, 2013 The steps below also work for Mac OS X Mountain Lion (10.8) with a couple of minor alterations.

The format of the entries in /etc/services puts the UDP or TCP designator after the port number instead of after the service name. So they should look like this:

ssh2 11122/tcp # my ssh port
ssh2 11122/udp # my ssh port

And in order to unload and reload the ssh.plist you’ll have to sudo.

$ sudo launchctl unload /System/Library/LaunchDaemons/ssh.plist
$ sudo launchctl load /System/Library/LaunchDaemons/ssh.plist

End of Update

My employer is getting ready to block all access to the usual ssh port (22). While this may seem like a security-through-obscurity measure it does eliminate the endless pounding of scripts against that well-known port. In preparation for the upcoming block on port 22 I followed the steps outlined in Mac OS X Lion - Changing SSHD Port to permanently change the ssh port on all my machines.

In a nutshell you first edit the /etc/services file and add an entry for the port number you wish to use for secure shell access. Pick one that isn’t already used for something else, e.g., 11122. Add two lines to the services file, one for TCP and one for UDP:

ssh2/udp  11122
ssh2/tcp  11122

Next you need to edit the /System/Library/LaunchDeamons/ssh.plist file. Here you want to search for the original ssh entry and alter it to point to your new ssh entry.

Search for

<key>SockServicesName</key>
<string>ssh</string>

and change it to read

<key>SockServicesName</key>
<string>ssh2</string>

Save both changes and then reboot your machine. Or unload and reload the services using

launchctl unload /System/Library/LaunchDaemons/ssh.plist
launchctl load /System/Library/LaunchDaemons/ssh.plist

Finally, in the Sharing pane of System Preferences make sure that Remote Login is selected. This toggles the SockService on or off. By changing the port number that SockService points to in the ssh.plist, and by defining the new port number in /etc/services you’ve set this toggle up to control your new secret sshd port.

The Mac OS X Firewall (under Security & Privacy in System Preferences) can be either on or off without effecting the Remote Login setting. Although why you would want to have the Firewall off is beyond me.

For convenience sake you can create an alias for any machine you regularly access

alias buildBox='ssh userid@machinename.tld -p 11122'

As with any change to low level configuration information on your system proceed with caution and have a good backup handy.


Is Pluto a Planet? ⧁


In a word, no. C. G. P. Grey once again delivers.


BASIC ⧁


Beginner’s All-purpose Symbolic Instruction Code or BASIC was the first computer language I learned back in 1977.


Git Commit Picture


The other day I ran across Victor Martínez’s posting about taking your picture every time you commit. The process is simple enough, you install imagesnap via brew and then add a post-commit hook to any Git repository where you want to record commit pictures.

Victor’s posting also links to a tool you can use to assemble these still images into a video. I’ll have to wait to have a collection of snapshots before experimenting with creating a video.

The only caveat I can see to this technique is that it imposes a dependency on the imagesnap tool. In the case of this site’s repository virtually all of the work is done from a single machine so I don’t need to worry about this dependency too much. However, if I ever move to a new machine I’ll need to instal imagesnap there as well.


Prey Books


I’ve been on a John Sandford Prey book orgy the past couple of weeks. So far I’ve read the first six books of the Lucas Davenport series in order, read the most recent book (#22), and I’m listening to yet another on Audio CD.

{{ “0425205819” | amazon_small_image }} {{ “0425208842” | amazon_small_image }} {{ “0425214435” | amazon_small_image }} {{ “0425224465” | amazon_small_image }} {{ “0425231062” | amazon_small_image }} {{ “0425237745” | amazon_small_image }} {{ “0399157689” | amazon_small_image }} {{ “0425221156” | amazon_small_image }}

I’ve got at least two more audio books from the series and three or four more print books as well. I’ll have to haunt the library stacks for the rest. Once I finish the Prey books I’ll move on to the Kidd books and then maybe the Virgil Flowers ones. I’ve read all of these books before so rereading them is like putting on old favorite clothes.


Octopress Sidebar Categories


After reading Dan Watson’s posting about listing categories in the Octopress sidebar I implemented it on my site.

Where Dan puts the aside in source/_includes/asides I put it in source/_includes/custom/asides, otherwise I followed his setup to the letter.

As a result of seeing my categories listed with a count of their postings I realized that I needed to do some clean up. When assigning multiple categories I tend to separate them with a comma. Octopress parses on spaces between categories so the trailing comma is treated as part of the category name. So posting something in “apple, nerdliness” results in an “apple,” category.

A simple grep command can search through all the postings and return a list of the files that contain one of these comma-added categories:

grep -H -r "categories: apple," _posts/

Some of my mislabeled categories only had one or two postings, one had 49. Not wanting to edit that many postings I used a find command to do the work for me.

find _posts/ -type f | xargs perl -pi -e 's/: apple,/: apple/g'

Since this command alters files you should probably do the work on a branch in case you need to revert following unintended changes.

With my categories cleaned up I now have a set of links in my sidebar allowing readers to investigate my site by topics. Now I just need to plow through the catch-all category (life) and properly tag those entries.


The Manhattan Project ⧁


After a week in Manhattan this past March we both wanted to stay longer. This video only adds to that desire.


Bane of Man's Existence


When I was in high school on of my buddies used to say that “glasses were the bane of man’s existence.” Based on my experiences trying to get my lens prescription updated the last couple of weeks I whole-heartedly agree with him.

It’s been three years since I had my eyes examined so I made an appointment with a new eye doctor for early June. My previous eye doctor discovered politics and now works for the state government after closing her vision practice here in town.

The exam was good and as I suspected discovered that my current prescription is no longer quite strong enough. I’ve reached the age where presbyopia is steady diminishing my visual acuity. With my new prescription in hand I set out to get new lenses for my current frames. I like the frames and saw no reason to get new ones. The glasses/frames side of the business where I had my eyes examined said they would need a day to fit the new lenses to my current frames. And their prices were quite a bit higher than the Vision Center at Walmart, so I opted to get the lenses at Walmart.

##Lenses, First Try On a Saturday afternoon I went to the Vision Center at Walmart with a copy of my prescription to order new lenses. The clerk who assisted me had great difficulty getting their computer system to recognize my insurance, and she seemed less than confident in her approach to gather the various measurements necessary. After about 45 minutes she handed me over to the other store clerk (who I’ve worked with successfully in the past). Clerk number two finished the order after another 30 minutes of futzing around. My patience was completely gone by this point so when the customer facing price display showed $170 instead of the stated $80 for the final price I canceled the order and walked out.

Lenses, Second Try

I went back to the eye doctor where I’d had my eyes examined and tried to order new lenses from them. Since they don’t carry my frames the lens would have to be “finished” in the store and fitted to my frames. The clerk said it would take all day - a business day - to accomplish this fitting. I cannot read or operate my computer with my glasses so this would entail a day off from work. I wasn’t happy about that requirement but okay. The total price was $125 - more than 50% higher than Walmart’s price.

After getting home and discussing it with my wife we decided that the premium price was too much and I called and canceled the order.

##Lenses, Third Try I went back to Walmart and ordered the lenses. This time I observed the customer price display more carefully and saw that it only shows two lines at a time, whereas the details of the price, the discount, the insurance allotment, and the total are spread out over many lines. Even though the display says $170 the actual cost is really $80. Lenses ordered.

##Lenses, First Fitting Try A couple of weeks go by and I get a call from Walmart saying my new lenses are in so I go there to get them installed. The first clerk is working that evening and she wasn’t able to setup my glasses properly. In hindsight it appears she managed to reverse the lenses, putting the left in the right-side and the right in the left-side. The are nearly symmetrical over the vertical axis which makes them hard to tell apart. However with them in the wrong sides the frames were visible distorted. When she did get them in right the lines for the bi- and trifocal areas were not parallel to the floor. The were at a 30º angle. I had her put the original lenses back in the frames and agreed to come in the next day to deal with the manager.

##Lenses, Second Fitting Try The manager had no more luck getting the lenses to work and agreed they needed to be remade. She said it would take another week or so. In putting my original lenses back in the glasses she managed to make a 3mm long scratch in the near vision portion of the left lens. Extremely annoying but livable for a couple of weeks.

##Lenses, Third Fitting Try When the second grinding of the new lenses arrived I returned to Walmart and the second clerk installed them for me. The width of the trifocal area was about half of what I’d had before. I had specifically requested that the bi- and trifocal portion of the lens be as wide as possible to match my current lenses. I look at a wide array of computer screens at work and wanted to swivel my head as little as possible. The trifocal area of my lenses is 34mm out of a lens that is 46mm wide.

And the clerk managed to mix up the old and new lenses so that at one point I had the scratched lens in the wrong side of the frames. They could make good use of some little colored stickers to keep track of which lens is which.

After 90 minutes in the store I gave up, requested my original lenses and a refund. To Walmart’s credit they did return my money. But I still don’t have new lenses and I’m reading around a scratch on my dominate eye side.

##Lenses, Fourth Try I am tempted to order new glasses and lenses online. The prices are far lower than from any of the local stores. However, you can’t see and try on the frames ahead of time. The best you can do is look a pictures and measurements. Plus, only one site I’ve checked out of four so far, makes trifocal lenses. I’m not sure I’d be able to specify the wide trifocal area I want. So I am reduced to visiting all the eye glasses stores in town looking for a new frame and new lenses.

The nearest Lens Crafters (where I got many glasses over many years while living in Illinois) is 60 minutes drive away. And I’m not entirely sure they can make trifocals in the store in an hour meaning I’d have to make 2 two-hour round trips.

Maybe I’ll just squint.