Category: Geekery

  • Cleaning Up Unicode Cruft in WordPress

    While helping someone with WordPress move earlier this week, I noticed a bunch of weird Unicode cruft (like ’ and –) in their posts and comments. Apparently, MySQL databases don’t like it when you switch their default character encoding. But different web hosts have different ways of doing things — so default character encodings can (and sometimes do) change while you’re moving a site around.

    Anyhow, after a bit of digging, I found a really handy set of MySQL commands that fixed things up. But I like to save time, so I made myself a Gist for future use and decided to share it with y’all…

    Hopefully someone else out there finds this useful! I know I’ll probably use it at least once or twice a week now that I’m doing a lot more work with MySQL imports.

    Good luck!

  • CMD + Conquer

    When I started over at WP Engine earlier this week, a brand new MacBook Air came into my possession. It’s very pretty and lightweight and I kind of love it more than any other computer I’ve ever owned. So much so that I made the decision to break with my normal tradition and keep this hot little number sticker free.

    That declaration only lasted about a day and a half tho…

    Why? Well, I just came across the Command Bamboo Back from Grove. And I really want it. Like in a bad way.

    It’s not a traditional sticker tho. It’s made out of real bamboo. And the shape carved into it actually changes that (somewhat ubiquitous) glowing Apple logo into something that I love so much that I put it on me forever.

    Anyhow, they’ve got a bunch of clever and novel designs over there. If you’re looking for something a bit different, do yourself a favor and browse around their shop.

  • Why I Prefer WP Super Cache

    Even though W3 Total Cache seems to have become the more popular and robust option for WordPress caching, I’ve stuck by and continue to recommend WP Super Cache.

    Why? In a word: simplicity.

    Now I could write a big long entry on why simplicity trumps a crapton of options and flexibility, but I’d rather have a look at the options screen for each plugin.

    We’ll start with WP Super Cache:

    This is all you see when you visit the settings page post install. If you really wanted to, you could just turn caching on and call it a day. Of course, you could (and should) go poking around under the hood a bit – so let’s look at the Advanced tab:

    So that’s a bit more extensive — and in some places, downright nerdy — but all of the crucial options stay above the fold. Furthermore, the blue button after the first set of check boxes and radio buttons does a pretty good job of saying “this is where all the really important stuff ends”.

    Now let’s compare that to the options that W3 Total Cache presents to users post install:

    While that’s pretty straightforward, it’s also a lot for someone who’s new to the plugin to take in. Not only that, it doesn’t really make it all that clear what the user should try if they’re getting started.

    Don’t get me wrong. This isn’t a me thing at all. As much as I could be a hater, I’m talking from experience here.

    You see, I deal with a pretty significant number of WordPress users over the course of my work week. And there’s always a handful that are running W3 Total Cache that have enabled some combination of Varnish, CDN & CloudFlare. The only problem is, they don’t actually have access to any of the those services.

    In most cases, they were told they needed to install a caching plugin, pronto. It’s not their fault if they’re taking a shotgun approach to using it. It’s the plugin author’s fault for not making things clearer.

    So until W3 Total Cache gives end users a better out of the box experience, I’m going to keep running and recommending WP Super Cache. If you’re tired of being buried under an avalanche of options that you never use, I suggest you check it out.

    Update: Frederick Townes responded on Twitter and claimed that W3 Total Cache was incomplete and sporting the “advanced” UI. Hopefully they’ll be able to roll out something a little more end user friendly soon.

  • CSS3 Hyphenation

    Now that the most recent versions of Safari & Firefox support proper hyphenation via CSS3, I kind of want to implement it on my sites. But thanks to Microsoft Word, I also have some really strong feelings against auto-hyphenation.

    *sigh* What’s a nerd to do?

  • “State of the Word” Slides

    Michael Pick posted his slide design notes for Matt Mullenweg‘s beautiful “State of the Word 2011” presentation and they are totally worth your time.

    Seriously. Read it now and thank me later.

  • API Endpoint

    Hey nerds! A generous soul has gone and created an API endpoint for Hipster Ipsum.

  • Omnibar? Wunderbar!

    Since I’m downright stubborn about switching to Chrome, I was really happy to see that someone had tried to emulate its location bar with Safari Omnibar. It’s got a little way to go still, but it’s got enough promise for me to keep it installed.

    Now all I have to do is break my habit of hitting CMD + L followed by a quick Tab to get me to the search field and I’ll be golden.

  • Google Page Speed Service and Large Uploads in WordPress

    So Google’s Page Speed Service looks pretty great – but if you get into the beta and upload a lot of media to your WordPress site, you’re going to run into a few snags. The cap for their caching proxy is currently set at 2MB. And while that’s fine for most folks, it’s not really going to fly for photobloggers and the like.

    Fortunately, there’s a workaround…

    All you need to do is create a subdomain (like admin.domain.com) and point it at your current WordPress install’s directory. If you don’t know how to do this, your web host’s support should be able to help you out.

    Now you’ll notice that when you visit that new URL, you’ll get redirected to your main domain. WordPress needs to know to not do that, so just add this code to your “wp-config.php” file:

    define('WP_HOME', 'http://'.$_SERVER['HTTP_HOST']);
    define('WP_SITEURL', 'http://'.$_SERVER['HTTP_HOST']);

    It doesn’t really matter where you drop it, but I like to put this sort of stuff after the MySQL information. Then just save out the file, kill your browser cache and try to visit your subdomain now.

    So long as things don’t keep trying to redirect you, log into your WordPress Dashboard (admin.domain.com/wp-admin/) and you should be able to post and upload files without any issues.

    Simple enough, right?

  • No More TimThumb

    With all of the hubbub around TimThumb, it’s probably a good time to point people to this handy guide on replacing it with functionality that’s already baked into WordPress.

  • Artisan 8-bit Photo Booth

    If you don’t already follow me on Twitter, you probably don’t know that I launched a new project last week. So take a minute and go check out Hipster Ipsum. You know, if you want to.

    I’ll admit that it’s kind of stupid — and making fun of hipsters is way played out by now — but this is one of those ideas that has been kicking around in my head for a while. And rather than just letting it flop around in my brainpan until someone else made it, I decided to carve out a little of my free time and actually ship it.

    I’m pretty happy with the results too. Here’s some of the text it’s generating:

    Jean shorts aliqua magna mollit. Whatever est leggings put a bird on it aesthetic sint tempor butcher. Keytar gluten-free fuck sustainable. Portland aesthetic chambray, Readymade nulla 8-bit bahn mi Austin keffiyeh Four Loko letterpress. Veniam skateboard deserunt vinyl nisi fugiat. Lo-fi accusamus sapiente, pariatur tofu aesthetic do leggings deserunt organic quis consequat.

    I’m sure that there’s plenty of hipster cliches that I’ve missed. So if you check out the site and see any that I might be missing, don’t hesitate to let me know!