Apple tip: Setting up Gmail with Google Calendar and Contacts on a MacBook Pro

So, you’ve got a brand spanking new MacBook and you want to configure the default apps to connect to your Gmail account and other Google services like calendar and contacts? Step this way, I’m going to show you how.

iPhone & iPad Users: You might be tempted to try the Microsoft Exchange trick that your iOS device can do which seamlessly connects Mail, Calendar and Contacts with Google automatically. This will not work on a MacBook!
Continue reading “Apple tip: Setting up Gmail with Google Calendar and Contacts on a MacBook Pro”

Linux: Using the find utility with -regex to delete files

Something I’m going to share with you today is how to delete a batch of files in Linux (a CentOS distribution in this instance) using the built-in find utility and some regular expressions.

Use case: It turns out that the backup utility for WordPress doesn’t delete old backups that it stores on your server. As these files build up, they typically consume a lot of space, and eventually fill up your hard disk.

Continue reading “Linux: Using the find utility with -regex to delete files”

WordPress: How to remove the Website URL field from the comment form

WordPress logoAs a blogger, the URL field in the WordPress comments form is a constant pain – either spammers are using it to drop shady links, or readers feel compelled to fill it with garbage just to fill in the field. Either way, it’s a nuisance. But how do you get rid of it?

Well, I spent a long time searching for the solution to this problem last night, and I’ve written up a solution for removing the URL field that takes into account a number of different scenarios you might encounter!

Obligatory warning! Never apply these types of changes to a production site – I keep a copy of my website themes on a testing server and make changes there. I suggest you do the same!  Continue reading “WordPress: How to remove the Website URL field from the comment form”

WordPress: Deleting comments on old blog entries

WordPress logoWe recently decided to clear out old comments on blog entries on one of our WordPress sites. We have almost six years worth of comments and data on this particular blog, most of it pertaining to old news items. While the discussions were interesting and engaging in their day, they now represent tens – maybe hundreds – of thousands of lines of database entries.

Data purists may shriek in horror, but we decided to prune these old comments rather than keep them for what little historical value they had. There’s a fairly handy line of MySQL code that can be run to delete old comments:

delete from wp_comments where date_sub(now(), interval 360 day) > comment_date ORDER BY comment_date ASC LIMIT 4000;

Continue reading “WordPress: Deleting comments on old blog entries”

Quickly upgrade to Ubuntu 11.04 Natty Narwhal

Ubuntu logoIn case you missed it, the latest edition of Ubuntu was released this week, Natty Narwhal (or 11.04 if you prefer).

It seems to have been one of the most popular releases ever, because I can’t connect to the Ubuntu website to upgrade!!! What’s happening is that because Canonical’s servers are so busy, the upgrade assistant can’t download the release notes for the new version. And so the upgrade fails. Continue reading “Quickly upgrade to Ubuntu 11.04 Natty Narwhal”