A good post on this topic by Brian Dickens over at HostileFork: http://blog.hostilefork.com/trashes-fseventsd-and-spotlight-v100/
If you’re reading this, you have probably found some USB stick or external drive with files named .Trashes, .fseventsd, .Spotlight-V100 (and possibly even the more rarely reported ._.Trashes) on it. You might also be annoyed to see files in various directories called .DS_Store. Right?
- Generated TLS/SSL certificate (free thanks to “Let’s Encrypt“, and easy thanks to Dreamhost’s built-in, couple-click-install Let’s Encrypt assistant). This sent me an email with my site’s public key. The private key can be downloaded from Dreamhost’s web panel.
- Switched WordPress’ main URLs from http:// to https:// in WordPress’ settings
- Loaded my site’s main page and used Chrome to identify page elements that weren’t using https. In my case one of those items was a Google font pack that was referenced insecurely by my WordPress theme (Origami). Thankfully, updating the theme to the latest version alleviated that problem, but if it doesn’t for you with your theme this page describes how to fix the offending bits manually.
- Loaded some of the archived pages and noticed they weren’t all fixed. Fixed a few posts to use protocol-relative URLs (//<host/path> instead of http://<host/path>), then decided that would take too much time and found this guide by which provided a couple handy SQL snippets to fix all of the archived posts in one go. I’ve reproduced them here in case they go away. Note that I had to change `wp_posts` in the snippet below to `wp_ft7r2p_posts`, which is what the table was called in my Dreamhost “One-click” WordPress install. I ran the query by logging into Dreamhost’s control panel and launching phpmyadmin for the WordPress database in question. This let me simulate the query before actually running it. This is also where I found out the table was called wp_ft7r2p_posts rather than wp_posts. Note that it could be done via the command-line mysql client just as well:
- Fix up image source URLs:
UPDATE wp_posts SET post_content = ( Replace (post_content, 'src="http://', 'src="//') ) WHERE Instr(post_content, 'jpeg') > 0 OR Instr(post_content, 'jpg') > 0 OR Instr(post_content, 'gif') > 0 OR Instr(post_content, 'png') > 0;
- Same query except catch single quotes:
UPDATE wp_posts SET post_content = ( Replace (post_content, "src='http://", "src='//") ) WHERE Instr(post_content, 'jpeg') > 0 OR Instr(post_content, 'jpg') > 0 OR Instr(post_content, 'gif') > 0 OR Instr(post_content, 'png') > 0;
- Fix custom fields (I didn’t have any of these):
UPDATE wp_postmeta SET meta_value=(REPLACE (meta_value, 'iframe src="http://','iframe src="//'));
- I also adapted the query above to fix images that were directly-linked incorrectly:
UPDATE wp_ft7r2p_posts SET post_content = ( Replace (post_content, 'href="http://krishengreenwell', 'href="//krishengreenwell') ) WHERE Instr(post_content, 'jpeg') > 0 OR Instr(post_content, 'jpg') > 0 OR Instr(post_content, 'gif') > 0 OR Instr(post_content, 'png') > 0
- Same query except catch single quotes:
UPDATE wp_ft7r2p_posts SET post_content = ( Replace (post_content, "href='http://krishengreenwell", "href='//krishengreenwell") ) WHERE Instr(post_content, 'jpeg') > 0 OR Instr(post_content, 'jpg') > 0 OR Instr(post_content, 'gif') > 0 OR Instr(post_content, 'png') > 0
- And one more to catch places where I hadn’t yet dropped use of ‘www’ in front of my domain.. and fix that while I’m at it:
UPDATE wp_ft7r2p_posts SET post_content = ( Replace (post_content, 'href="http://www.krishengreenwell', 'href="//krishengreenwell') ) WHERE Instr(post_content, 'jpeg') > 0 OR Instr(post_content, 'jpg') > 0 OR Instr(post_content, 'gif') > 0 OR Instr(post_content, 'png') > 0
- Same query except catch single quotes:
UPDATE wp_ft7r2p_posts SET post_content = ( Replace (post_content, "href='http://www.krishengreenwell", "href='//krishengreenwell") ) WHERE Instr(post_content, 'jpeg') > 0 OR Instr(post_content, 'jpg') > 0 OR Instr(post_content, 'gif') > 0 OR Instr(post_content, 'png') > 0
- Finally a catchall, as it turns out I missed a bunch:
UPDATE `wp_ft7r2p_posts` SET `post_content` = REPLACE(`post_content`, 'http://krishengreenwell.com', '//krishengreenwell.com') WHERE `post_content` LIKE '%http://krishengreenwell.com%' COLLATE utf8mb4_bin
- Finally get rid of the www’s:
UPDATE `wp_ft7r2p_posts` SET `post_content` = REPLACE(`post_content`, '//www.krishengreenwell.com', '//krishengreenwell.com') WHERE `post_content` LIKE '%//www.krishengreenwell.com%' COLLATE utf8mb4_bin
- There are still a number of manually-generated legacy HTML pages from back when this site was run on MovableType that have http links that I’ll eventually get around to changing.
- I’ll probably back up my public/private keys on a USB key and store them somewhere for safekeeping.
That’s it! Happy green lock everywhere!
While learning about the origins of Node (getting out from beneath my rock), stumbled across this article by Tom Dale, which I found informative and well-written. Here’s a quote:
I really appreciated the nuance this article brought. The real world is complicated, and this article reflected that.
In short, here on the West coast of Florida, not a lot happened. Matthew took a turn east while in the Atlantic, so didn’t hit the East coast nearly as hard as was expected. Our friends, who stayed with us that night, live on the Floridian East coast and — without exaggeration — were expecting their house to be completely demolished by the morning. The projection had the storm eye coming right over their house at a Category 4 estimated strength. Turns out they didn’t even lose a roof shingle.
So while the storm still had major effects elsewhere — per this article “Hurricane Matthew killed more than 500 people in Haiti and at least 26 in the U.S., more than half of them in North Carolina, and three people missing” — it’s a big relief for many on the East coast of Florida.
So, in the grand krishenblog tradition of posting about hurricanes, here’s the first one that’s really making an impression on Florida this year*: MATTHEW. So far, skies here are slightly overcast and no rain, but the clouds are definitively moving toward the Gulf. Authorities are mostly worried about storm surge. Sarasota has about a 35% chance of experiencing Tropical Storm force winds at this time (>39 mph for 1 min average). Expectation is the worst of it will be in about 15 hours. Find the latest info here. Check back here later for on-location updates.
*There was Tropical Storm earlier this year that threatened to do something but ended up just being a little bit of rain, at least for Sarasota.
Check out ravi.rajendra’s solution here, which I’ve copied below in case the post goes away:
- Quit Safari
- Go to ~/Library/Safari/ in finder.
- Find “History.plist” file and edit it using textedit or text wrangler. (you may want to backup this file in case you messed it up)
- Search in the file for the URL (for e.g. yoursearch.com) or the text you are entering in the “top hits”.
- Identify the parent “<dict> …. http://yoursearch.com ….. </dict>” and delete it from the file.
- Find any other instances of the same and delete the entire “” tags.
- Start Safari and enjoy. “yoursearch.com” will no longer be there.
Worked for me in Safari 7.1.2.
Update: Unfortunately the top hit came back a little while later. I think it shows the top level of the site as a top hit if you visit any subpage a few times.
If you’re trying to clean up an older Mac (10.7 or older), here’s a place you can find older versions of OmniDiskSweeper.
Me too. Christian Varga’s workaround actually works really well. I wired together a keyboard shortcut for it using BetterTouchTool as he suggested, which was new to me also.. yay new toys! I chose “F5” as my shortcut though, as I actually use Command-E to eject USB keys on a fairly regular basis.
CSS changes on your Dreamhost-hosted website doing nothing? Try turning off PageSpeed:
- Navigate to panel.dreamhost.com
- In the upper-left, under Toolbox, click “Manage Domains”
- Locate the troublesome domain in the list of domains that appears. Under the “Web Hosting” column, click Edit.
- Under the “Web Options” section, locate the “Page Speed Optimization?” option and uncheck it.
This was the root cause behind a few of hours of frustration for me. The only reason I figured it out was because by random chance, I happened to wait long enough between my last change and clicking reload to see that I had done nothing and the CSS, which was previously failing, began to work on its own. This pointed to a server-side caching mechanism, and I remembered when I signed up for hosting, that I was asked about some kind of caching/optimization feature. Seemed harmless enough at the time. lol. With PageSpeed off, my changes appear instantaneously. I’ll probably turn it back on once I’ve finished primary development, but I’m recording this finding here in the event it helps someone.
If your CSS isn’t working, PageSpeed Optimization was already off, and you’re using WordPress, this page contains a few other tactics to try out.
Continuing the theme started a couple of days ago, here are today’s fortunes:
- A big fortune will descend upon you this year.
- Even the smallest candle burns brighter in the dark.
- To make dreams real, first you have to have them.
- Never trouble trouble till trouble troubles you.