lyncd

Some minor improvements to Minify for CSS

Recently I was taking a closer look at some minified CSS output, and I noticed a few things that Minify could be doing to compress CSS slightly better. more …

Filed under: Code.  Tagged: , .

The real scoop on WordPress ‘Connections Information’ request for FTP info

The last few versions of WordPress have had a feature that lets you install or upgrade a plugin directly through the WordPress GUI. There’s just a small problem — for many people, the process fails and, instead of explaining the issue, WordPress redirects to an inscrutable “Connections Information” screen requesting FTP server credentials. Which, for people like me who don’t use FTP, is kind of a dead end.

I deploy all my code through a VCS, so it wasn’t until I started testing activation/deactivation/uninstall hooks for a plugin that I ran into the problem. Anyway, the reason I’m writing this post is that, while the workaround is just a one-liner, unfortunately, most of the “solutions” I found on the web were wrong or at best incomplete. Also, I think what WordPress is doing here could use improvement. more …

Filed under: Code.  Tagged: .

Get it while it’s hot: User Spam Remover for WordPress

I’m releasing a WordPress plugin that I wrote to tackle the scourge of user registration spam — those annoying bots that linkspam the WordPress registration form.

If you need a way to silently and automatically delete these spam accounts, and block the new user notification e-mail that WordPress normally sends, check out User Spam Remover. more …

Filed under: Code.  Tagged: .

HTML Minify for WordPress and WP Super Cache: Now a plugin!

It’s been a while, but I’ve updated my code that adds Minify to WP Super Cache, making everyone’s favorite WordPress caching plugin that much better.

What’s better is that my code now operates as a fully fledged plugin to Super Cache, so it’s now a drop-in install (no more patches!). Go to WPSCMin’s project page for all the info. more …

Filed under: Code.  Tagged: , , , .

Replacing MacBook’s AirPort card with an Atheros AR5BXB6 from an IBM Thinkpad

Four years of 85°C CPU temperatures took their toll on my friend’s MacBook. Her AirPort wireless card still functioned, but suddenly her wifi signal had become unusably weak.

I checked her system configuration, opened up her first-gen MacBook, and everything looked fine. But with plenty of others reporting similar issues, it was most likely the card had succumbed to heat. It could sometimes maintain normal wireless range for several minutes — when started totally cold — but after the system temps warmed up, would go back to only a few feet of range.

The model number printed on the AirPort card is an Atheros AR5BXB6. A Google Products search for “AR5BXB6” turned up these $13 Thinkpad pulls among others available online, and for $13 we figured it was easily worth a shot as a drop-in replacement, compared to the cost of a new Apple card. It turned out be only a little tricksier than that. more …

Filed under: Systems.  Tagged: .

Better Google Analytics JavaScript that doesn’t block page downloading

If you saw Steve Souders’ March 5 talk at Google and have ever used Google Analytics, then you were probably amused when he used GA’s JavaScript insertion code as his “wrong” counterexample. Well, at least I was, and somebody else mentioned it in the Q&A so I figure I’m not the only one.

The GA insertion code that Google gives you to put on your site does a couple of bad things: First, it uses document.write, and second, it loads ga.js directly, which blocks browsers from doing any page rendering or downloading of other page components (images, scripts, stylesheets) during the whole time it takes ga.js to download and execute. In other words, Google Analytics makes your pages load slower!

Using Steve’s best practices, I’ve coded up a better version that does DOM insertion of the script tag and uses the “script onload” technique to initialize the tracker, so that it doesn’t block I/O, and you can inline it anywhere on the page or even load it from an external file. You can choose to lazy-load GA whenever you want — for instance, even after window.onload fires — so that it’s totally asynchronous and doesn’t interfere with page rendering at all. more …

Filed under: Code.  Tagged: , , .

« Newer posts | Older posts »