Skip to content

Blog

Backing up your Mac’s /Users folder

Just finishing off my first ever backup of my MacBook. I’ve made a complete copy of the /Users folder, which should back up all the files and preferences of all the users on the computer.

Just for reference, and to show how I’m doing it, I’ll walk you through how I’m doing my backup.

I’m backing up to an external 200 GB hard drive, onto a partition formatted with NTFS. Thanks to MacFUSE and the NTFS 3G projects, I can safely write to the drive easily. I’m not going to cover how to install them here, so I’ll just assume you’re using some kind of external storage already set up for writing use on your Mac.

Now, we could just copy the files onto the storage medium in the Finder, but unless your removable disk is formatted with OS X’s native file system, you’ll lose Mac-specific metadata. While that’s not usually vital, it’s always better to preserve the original information and for that reason we’re going to make a disk image file (yes, like those .dmg files you download) in which to store our backups. Storing the files inside the DMG makes a mini filesystem-in-a-file which is formatted with HFS+ (the native format), so we keep all that extra information.

» Read the rest of this post…

Taking Ajax further with PHP

Peter's WebDev Workshop

Find this tutorial useful?





First of all, I have to apologise. It’s been literally two months since my last post in this series, and it’s been more than that since I last looked at Ajax in PHP. OK, I might admit it, it was this comment that motivated me to pick up this series again. Oh, that and I’m now on the half term break, so I’m finally getting round to some things that have been on the back burner for a long time.

In our last Ajax tutorial, we got started with Ajax using PHP and made our first Ajax application.

Today, we’re going to take Ajax a little further, by building a little application where our user selects a product from a pop-up list, and then we do a little Ajax dance to get some product details (and an image) and display them in a box below. We’ll be making our own little XML schema which we’ll use to pass information between the JavaScript in the user’s browser and our PHP script on the server.

» Read the rest of this post…

OOP in PHP – Part 1

Peter's WebDev Workshop

Apologies. It’s been literally months since I did my last tutorial here. Most of my tutorial effort has been focused on FOSSwire. Anyway, I’m back now and thanks to a request from Nick I’m starting a new multi-part tutorial today.

Now this has been covered in many places before and the subject is object-oriented programming (OOP) in PHP. For the purposes of this tutorial, I’m using PHP 5.1.6 on Linux, but all of this should work on PHP 5.x on any platform and most of it will work in PHP 4.x.

» Read the rest of this post…

Hacking Firefox 1.5 extensions for 2.0

One of the bad things about upgrading to a new Firefox major version is that inevitably, some of your favourite extensions won’t be modified to work with the new version. And with Firefox extensions being so awesome (and arguably crucial to Firefox’s success)…

But, thankfully, it’s not too difficult to hack the extension files to make your extensions work with the new version.

Before I begin – this process could make your extension (and maybe your Firefox profile too) not work – so do it at your own risk! Having said that, starting Firefox in Safe Mode and uninstalling the culprit extension usually fixes any extension issues that may arise.

I’ll be using BoxCheck for this tutorial.

» Read the rest of this post…

Recording screen demos with pyvnc2swf on Windows

I did it for (Ubuntu) Linux and now it’s the turn of Windows to get some screen recording love with pyvnc2swf. The installation procedure on Windows is also fairly simple, but unfortunately because Windows doesn’t ship with Python (unlike well, say, Linux and Mac OS X and most other Unix systems) we have to install that first.

So without any further ado, we’ll get going.

» Read the rest of this post…

Installing WPGet – video tutorial

You didn’t ask for it… but you got it anyway.

If you’ve been wondering exactly how to install WPGet, you need wonder no more, as I’ve done a screencast with a quick demo installation of WordPress.

This should serve any installation queries until the next version of the Config Tool arrives, which will feature one-click configuration (you will be able to download the fully ready-to-go script without any copying and pasting).

So, get watching!

A few notes:

  • The reason the download in the video took so long is because for some reason the DNS servers over here are being really slow this evening, meaning it takes almost 15 seconds to visit most web pages (every time it does a lookup). Grrrrr…
  • Needless to say, the database password (and relevant details) you may or may not have seen in the demo don’t work anymore. 😛
  • Fellow KDE users may ask why I was copying things around and not working off the server directly (I love that feature in KDE). The reason is, most people won’t have that ability or won’t be used to that way of working, so I copied and pasted my way around instead.

Recording screen demos on (Ubuntu) Linux

You may well have recently read my glee at getting a decent screen recording solution for Linux running and working, and this tutorial on how to get it to work for you has been brewing for a while now.

However, this solution is not just for Linux. It’s actually cross-platform and works across the big three main operating systems and should work on other Unix systems with little changes. Don’t worry, the Windows tutorial is coming up soon!

(Quick note – there are a couple of issues that I haven’t ironed out yet in this tutorial, but I wanted to get it out on my site sooner rather than later. They don’t affect installation, but I can’t seem to get recording in Ubuntu yet. It’s still worth running through the install, however, and rest assured I am working on the problems and will get them fixed as soon as I can!) All fixed!

This is also the first tutorial to be brought to you courtesy of my fresh new Ubuntu installation, just for doing tutorials (so I don’t have to uninstall and reinstall everything from my main machine where it’s working nicely, and of course for Ubuntu specific stuff).

OK, let’s go!

» Read the rest of this post…

I like vnc2swf – oh, and a quick screencast for you

Finally found a decent video screen capture solution for Linux (well, actually it’s cross-platform but that’s even better). It’s called pyvnc2swf and hopefully it will allow me to augment my future tutorials with video and audio.

So to test it out, here is a quick demo of killing processes, tying in with my recent tutorial on the subject.

Don’t worry, I’ll reveal all on how to set up pyvnc2swf with audio and all that stuff in due course.

Watch it here.

(While I can get KDE running in my recording VNC system by running killall twm;startkde, I can’t seem to find the command for Gnome, and it would be great to offer cross-desktop screen demos. Someone tell me how! Please…)

Killing misbehaving programs and processes

Beginner's Linux

It’s time for another quick Beginner’s Linux!

I’d love to say it doesn’t happen on Linux, but very rarely it does. I can say it happens less often than on Windows, though. What am I talking about? Programs and processes misbehaving – locking up, stopping working and generally causing a problem.

The problem on Windows is that if this happens, there’s no sure fire way to just nuke the offending app from your running processes. Yes, you can use Task Manager and close the process, but if that doesn’t work, well… (bad memories here).

On Linux, if this situation does occur, you have a couple of wonderful programs called kill and killall that are invaluable for killing things when they go wrong (saves many a restart of the whole system).

This is going to be quite a quick tutorial, partly because the subject matter doesn’t take that much time to cover and partly because I’m starting to get quite a lot of work I have to do, which means I’m going have to be a bit brief. Anyway, onto the tutorial…

» Read the rest of this post…

Building your first Ajax application with PHP

Peter's WebDev Workshop

Find this tutorial useful?





Greetings and welcome to an all-new tutorial series, Peter’s Webdev Workshop. This tutorial series will focus on web development, mainly focusing on using PHP as a server-side language, but I’m not ruling out having a crack at Python or Ruby, ASP.NET/Mono C# or something like that. This series will also look at JavaScript on the client side and we’ll be using XHTML for all the markup.

Before I jump into today’s topic, there’s a bit of admin and introduction I need to do to start up the new series. See you after the jump!

» Read the rest of this post…