greg.harvey's blog
Setting Up Git And Gitosis On CentOS 5.2
Submitted by greg.harvey on Wed, 09/06/2010 - 15:51This article is a tweaked version of several tutorials around. Many of the original links courtesy of Adrian Simmons. Thanks to all the others who gave me loads of help in IRC and thanks to Jerad at Lullabot for inspiring me to dive in to Git with this article.
Sharing An NTFS External Drive On A Linux Network With NFS
Submitted by greg.harvey on Thu, 20/05/2010 - 12:29For my own sanity I'm blogging this, since every time I have to do it I end up jumping through the same hoops and cursing myself for not blogging it!
I have a USB external drive on one of my machines. I want it shared across the network. It's an old Windows drive formatted as NTFS. Here are the steps:
1. On the "server" install required services and applications. As root:
$ yum install nfs-utils ntfs-3g ntfs-config fuseFUSE should be there already, but just in case. The GUI for ntfs-3g is optional.
2. Make sure the NFS services is enabled and loads on boot:
Panels 3 And The 960 Grid System
Submitted by greg.harvey on Wed, 12/05/2010 - 20:47This post was going to be longer, but I just lost the entire completed document because the worst (and probably most expensive at $15/day, yes DAY) mobile Internet provider in the world, EVER, just dropped my connection mid-submission and for the zillionth time today. So you'll have to make do with an angry and hurried synopsis of what I would've written.
Installing 3G USB Modems On Linux
Submitted by greg.harvey on Wed, 28/04/2010 - 11:27So, last night I lost not inconsiderable amounts of time and sleep to a Vodafone Italy 3G USB key. Trying to get these things set up is supposed to be fairly straightforward, however the end-to-end process is not really documented anywhere, as far as I can tell. Maybe for individual devices, but not in any generic way.
Since this is the second time I've done this now, and in both cases it was a pain in the ass, I am documenting some generic steps so I don't forget what I need to do all over again!
Free SSL With VPS.NET
Submitted by greg.harvey on Thu, 08/04/2010 - 21:22Ok, so this is *purely* for my memory, a kind of bookmark. But VPS.NET, the hosting company I often use for virtual machines, does free SSL certificates for all customers:
http://www.vps.net/forum/public-forums/announcements/233-free-and-unlimi...
Here's how you get one and configure it. (Using the VPS.NET Centos 5.4 64 bit LAMP image, and with ISPmanager Pro - also free from VPS.NET - as the server control panel. This is my usual set-up.)
- Set up your VM in the usual way
Drupal 7 Cheat Sheet: The Database
Submitted by greg.harvey on Tue, 30/03/2010 - 10:29This is a quick post while it's fresh in my head, regarding porting your contributed modules to the Drupal 7 API. This post specifically focusses on database manipulation and provides the like-for-like changes. If anything here is wrong, or could be done better, please let me know!
First up, individual results:
<?php
/*
* Remember this?
*/
$value = db_result(db_query("SELECT some_field FROM {some_table}"));
/*
* Forget it! It now looks like this:
*/
$value = db_query("SELECT some_field FROM {some_table}")->fetchField();
?>Scared Of Features? Don't Be!
Submitted by greg.harvey on Fri, 26/03/2010 - 13:55I'm an experienced Drupal developer. I've been embedding stuff in code for ages now. Views, Panel pages, ImageCache presets, even putting CCK content type exports in to hook_install() implementations just to try to keep stuff in code. Many of you are probably in the same boat. Keeping stuff in the database brings all sorts of ugly deployment and performance issues, so we avoid like the proverbial plague.
Cleaning Up After Migrating To Drupal
Submitted by greg.harvey on Wed, 17/02/2010 - 14:35We have just finished a migration job for a client of ours from an old .Net system in to Drupal, the last task of which was to write some Apache mod_rewrite conditions and rules to deal with the URLs of their old website. This proved to be more trouble than I thought, mainly because I struggled to find examples of how this might work.
Firstly, the ground work. The URL pattern to be redirected looked like this:
MainArticle.aspx?m=33818&amid=30301119Multilingual Drupal: Some Dos And Don'ts
Submitted by greg.harvey on Sat, 30/01/2010 - 15:06So we've done all French sites before. And we've done all English sites before. But a recent project was our first real forray in to multilingual sites and it's an e-commerce/Ubercart job! Talk about gluttons for punishment!
There are bags of tutorials, so I'll keep this short but sweet. A list of dos and don'ts from our painful, recent experience:
- Don't change the default language after initial set-up. Set your default language right at the start and don't mess with it. Ever.
How Drush Make Just Changed My Life
Submitted by greg.harvey on Thu, 28/01/2010 - 12:18Note: Apparently it works fine with Windows too! See comments.
I'm pretty excited right now. I just tried drush make for the first time. Download it here:
http://drupal.org/project/drush_make
That's an order! You'll need drush too, if you don't have it yet (in which case, shame on you ... call yourself a Drupal developer?!)
http://drupal.org/project/drush

