John Blade’s Homepage

One man on one island.

Archive for the ‘Technical’ Category

Drupal - “Content (missing)”

Comments

I’ve started playing with Drupal and looking at moving a few sites over to it. In a late night session of bolting things together I ran into a bit of a snag with a few modules trying to create thumbnails on teaser articles.

Unfortunately when I installed the imagefield CCK module I ran into a snag where it wouldn’t allow me to continue without the ‘content’ module which was missing.

I attempted to search for this missing module in the drupal module downloads section with no luck… http://drupal.org/search/node/type%3Aproject_project+content gave me no joy at all.

Luckily, the a nice Drupal IRC user slapped me with a quick ‘CCK = content’ line after I pleaded where this magical ‘Content’ module is and of course after I installed the CCK module everything worked like a charm. I had thought I had already installed this module and was probably too tired to have checked this first…

So for any newbie Drupal users out there I hope you find this helpful tip on Google before you harass some poor sod on IRC… that way you might actually appear somewhat knowledgeable.

Written by Blade

September 30th, 2008 at 10:40 am

Posted in LanSmash, Linux, Technical

Tagged with ,

Macbook Pro 320GB upgrade

Comments

Seeing my partner’s brand new MacBook Pro came with a spanking new 200GB harddisk I thought my measly 120GB disk was just not enough.

I found a nice Western Digital 320GB harddisk that was quite cheap, and set about taking my Macbook Pro apart. Note to self, not a good idea to start such projects on the coffee table when drunk. The procedure went fairly smoothly since I had my Torx screwdrivers handy.

With the old harddisk out and the new one in I started installing a new copy of Mac OS X. I had my trusty USB harddisk recovery tool handy so I was able to plug the old 120GB disk into the Mac’s USB port and use the Migration Assistant to copy over my profile to the new drive.

I just love the Migration Assistant, without it this job would have been a longer more painful process….

Anyhow, after two weeks of using the new drive I’ve had a minor catastrophe.

Coming home one afternoon I took out my bag and found Macbook to find it red hot. The machine had been running inside the bag and with no air circulation…. Yikes! I thought at first it might be something to do with the Sudden Motion Shock detection systems messing with the auto startup, but no it was the lid sensor.

I put the machine to sleep and held it up; pinching the closed lid made the machine start back up. Obviously the magnetic sensor that detects the position of the lid was slightly out of alignment. I’m sure an apple technician could re-align it, but instead I just changed the lidwake behaviour.

$ sudo pmset -a lidwake 0

Typing this command sets the computer to not automagically start up when I open the lid, instead it starts when I hit a key or touch the mouse.

It’s not a bug, it’s a feature. :P

Written by Blade

August 8th, 2008 at 10:00 am

Posted in Mac OS X, Technical

MyBook backups with Rsnapshot and some bash trickey

Comments

I had a client accidentally purchase half a dozen 500GB MyBook’s instead of the simpler cheaper USB models.

Since this site is remote from me it took a little while to deduce what was going on since the MyBook’s don’t act as USB drives and hence don’t appear as a USB device to linux.

User: ‘Yes, I’ve plugged it in! Yes it’s using the white cable!’
Me: ‘So… what exactly does it say on the box what drive it is…’

Anyhow, after figuring out that is was a MyBook I implemented ssh access using Martin Hinner’s clever hack and found a nice website of various MyBook Hack’s.

I was originally using the venerable Rdiff-backup, but alas couldn’t see it in the Optware packages. So I implemented a Rsnapshot solution, the only problem was I wanted some notifications from the MyBook devices to check that the backups were working, and so a simple bash script was in order…

#!/bin/bash
mailto=my@emailaddress.com,clients@theclientsdomain.com
time=$1
if /opt/bin/rsnapshot $time > /tmp/rsnapshot.log 2> /tmp/rsnapshot.logthen   subject='Backup success'else   subject='Backup FAILURE'ficat /tmp/rsnapshot.log | /opt/bin/nail -r admin@theclientsdomain.com -s "$subject" $mailto

Written by JB Hewitt

June 20th, 2008 at 12:13 pm

Posted in Code, Linux

WordPressDash = pretty cool

Comments

Just quick plug of a new Widget I found today called WordPressDash. It’s just thing for adding 5 minute rants (see previous post) and various other quick edits.

Written by JB Hewitt

October 25th, 2005 at 11:33 am

Posted in Mac OS X, Technical

I hate Nano!

Comments

I hate that cursed text editor. This morning I spent 5 minutes trying to figure out why a fresh crontab wasn’t working as I ssh’d into a server… My syntax was correct yet crontab refuse to save my entry stating bad minute errors in crontab file.
I then realised it was the crap characters nano was feeding into the beginning of the file!

A swift export EDITOR=vim and my crontab problems were gone.

Note: After bitching to a friend of mine who is pro Nano he stated to me that nano > 8. My point exactly, he’s so handicapped from using nano that he can’t even type an Asterisk.

Written by JB Hewitt

October 25th, 2005 at 11:25 am

Posted in Linux, Technical

Linux

Comments

I came across a selection of delciously funny captions for a swag of Linux distributions. Those who aren’t Linux fan-boys/girls will probably just scratch their heads.

Caldera, Debian, Fedora, Gentoo, Mandrake, RedHat, Slackware, Ubuntu.

Written by JB Hewitt

October 18th, 2005 at 2:37 pm

Posted in General, Linux