Moving to HTTPS-only

All the web stuff at polarweasel.org should be encrypted-only now. In other words, when you visit a page on the blog, or on the main site, you should see the little lock-icon thingy — or whatever your browser uses — in the address bar.

For my own future reference, and maybe yours too, here’s what I did.

These sites are hosted on Dreamhost, which makes it really easy (two clicks) to get a Let’s Encrypt certificate. So I did that for the various sites.

Then, I forced the web server (Apache, in this case) to redirect all non-encrypted requests to the encrypted site instead. To do that, I added this sort of thing to each site’s .htaccess file:

# Force all connections to go over SSL
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://sitename.org/$1 [R,L]

(Writing it that way, with no conditions, should guarantee a 500 error if mod_rewrite is disabled for some reason.)

That’s all you need to do for a static site. For the WordPress sites, you need to do a couple more things: set the site URLs in the Settings – General menu to https instead of http, and add the following to the site’s wp-config.php file, right above the “stop editing here” line:

define('FORCE_SSL', true);
define('FORCE_SSL_ADMIN', true);

And that’s it. More or less.

Note: If any of your pages have hard-coded (http://something) links in them, including calls to CSS stylesheets or Javascript, instead of relative (/something) links, you’ll need to update those. Relative links are your friends; use them.

BioLite CampStove

The BioLite CampStove is a brilliant idea. Burning some little sticks will cook your food and charge your phone (or other USB device) all in one shot. Nice.

I’d love to own one, but most of the time, I wouldn’t be able to use it here in Colorado (or New Mexico, or Utah, or all our other desert-type neighbors). Fire bans, and all. If we were move someplace wetter, though, I’d be all over this.

How to un-break HP printing on Mountain Lion (and Lion)

UPDATE A subsequent update fixed the problem. Or at least didn’t re-create the problem.

HP software update 2.10 came out recently for Lion and Mountain Lion, and causes apps to crash when you try to print. If this is happening to you, here’s what to do about it.

Delete this:

/Library/Printers/hp/PDEs/hpPostScriptPDE.plugin

(You’ll need to provide authorization, either with sudo or by giving an administrator password to Finder.)

There is no step 2.

Top 10 API Worst Practices

Programmable Web just posted a really nice list of 10 reasons why your API sucks. Or doesn’t, depending on how good your documentation and developer experience (DX? Do we really need another bullshit acronym, people?) are. The post also links to their own list of 5 attributes of a great API. Definitely check out the presentation slides in that post.

Note that a number of the bad things (unexpected and undocumented releases, poor developer experience, inadequate support, and poor documentation) and good things (provide great developer support) are documentation-related. How surprising. Yet another bunch of reasons you should add a good writer to your development team.

The hobby is getting more serious

So the Apple TV is now officially a high-definition device, capable of 1080p output. Still officially a hobby for Apple, but the strategy behind it is becoming increasingly clear: year after year, chip away at the dwindling reasons to subscribe to cable or satellite.

Netflix and iTunes have pretty much eliminated (non-reality) TV series now, for a large segment of the population. Movies are coming along nicely, with Netflix streaming and iTunes movie rentals, along with sharing from computers and devices on your home network.

The most oft-repeated reason to keep cable or satellite seems to be sports programming. It would appear that Apple has baseball, basketball, and hockey taken care of now. Football (of the American variety) is no doubt tougher (read: much more expensive), and football (of the rest-of-world variety) is likely the same story. This is hardly an insurmountable problem, though it’s not quite as easy as “just add money and stir”. Give it some more time.

Maybe I’m wrong about the strategy. We shall see. But I don’t care about either kind of football, or anything else that happens on cable, so it looks like a winner to me right now. We’ll have one in the living room pretty soon.

Advice to Youth, by Mark Twain

I can hardly wait for our upcoming daughter to be old enough to appreciate Mark Twain’s Advice to Youth. It’s some of the best advice I’ve read in ages. (I really do want her to read it, along with everything Oscar Wilde ever wrote, for starters…)

Be respectful to your superiors, if you have any, also to strangers, and sometimes to others. If a person offend you, and you are in doubt as to whether it was intentional or not, do not resort to extreme measures; simply watch your chance and hit him with a brick. That will be sufficient.

Unplggd reviews the Samsung Galaxy S II Epic 4G Touch

When Bigger Isn’t Better: Samsung Galaxy S II Preview | Apartment Therapy Unplggd

First, WTF is up with that name, Samsung?

I find it interesting that Apple’s devices appear to be considered untouchable by so many reviewers. This review might as well read, “Well, it’s ugly, not as good as its 18-month old competitor, and clearly designed and built by chimpanzees, but it’s pretty much better than the rest of the also-rans.”

(Are there really no kick-ass Android phones on the market? What’s the problem, here?)

My two favorite quotes:

It’s still no Retina Display, but Samsung’s Super AMOLED is a category leading display otherwise.

If we were just considering specs on paper and were in the market for an Android based phone, this would be a frontrunner. However, after our short demo with the Samsung Galaxy S II, we weren’t wowed by the ergonomics, and to a lesser extent the material build, finding it best suited for those with larger hands and a blind eye to UI clutter.

Useful auto-electrical sources

In an earlier post, I mentioned Rhode Island Wiring Service, purveyors of reproduction wire, including what looks to be every wire style used in Land Cruisers (40s and 60s, anyway).

Other good sources of auto/boat electrical parts I always forget about:

Genuinedealz does free shipping, and their prices are great. They will make custom cables, too, for a $1-per-connector labor charge. I remembered about them tonight, right after I spent more than I should have for some Blue Sea stuff on eBay.

Summit Racing does have good pricing and selection on Weatherpack connectors, among many other things.

Del City Wire has reasonable prices, and they (very) occasionally do free shipping on small orders. Memorial Day weekend is apparently one of those free-shipping occasions.

Susquehanna Motorsports makes very good headlight harnesses, and is a good source for all things Hella (including E-code headlight housings). And all things rally-related, of course, from WRC-spec mud-flap material to Hans Devices.

To be edited as I remember or discover more