Howto: Backup your iPhone on another machine

Jane asked

“I’m nowhere near my iMac, and won’t be for weeks. I need to backup my iPhone onto my MacBook Pro or external hard drive today. How?!”

To which the answer is, suprisingly, use iTunes.

It turns out that once you have connected your iPhones to iTunes on another Mac you can just right click on the device and select backup like so:

backup-iphone

Hopefully this will help other people in a similar situation in the future.

my wordpress toolbox

A long time ago I wrote about the ways in which you can get involved in WordPress development using free available tools on windows in my post “Windows WordPress toolbox”.  Since that post I have come up with a number of useful scripts and shortcuts that I use in my WordPress development.

Here are a number tools that I use most often, these are a set of bash functions which you can stick in your ~/.bashrc file on your linux machine or mac :

//Download a patch from a trac install and apply it to a svn checkout
//e.g. wp-trac-patch http://trac.wordpress.org/attachment/ticket/2345/2345.diff
wp-trac-patch() {
svn revert -R . & curl "$1?format=raw" | patch -p0
}
//Search through a subversion checkout using grep (only search the .php and .js files)
//e.g. wp-grep the_excerpt
wp-grep() {
find . \( -name "*.php" -print , -name "*.js" -print \)  | xargs grep "$1"
}
//Merge a change from trunk to a branch in a subversion checkout of the whole repository
//e.g. wp-merge 1234 2.6
wp-merge() {
svn merge -r $(($1-1)):$1 trunk branches/$2
}
//Output the svn:eol-style property of all the files in a repository
svn-eol() {
find . \( -name "*.php" -print , -name "*.js" -print \)  | xargs svn propget svn:eolstyle
}

I hope you find this useful

Debugging ajax problems with firebug.

Now WordPress 2.5 RC1 is out it the wild for testing we are receiving some reports of strange problems with some of the ajax functionality in the admin pages so I have prepared a quick tutorial to help people collect the relevant debugging information to help us investigate the problems.

Here is how to prepare:

  1. Install Firefox (if you don’t have it already!)
  2. Install firebug. This is the web debugging tool of choice.
  3. Load up the relevant WordPress admin page that is not working for you.

Continue reading “Debugging ajax problems with firebug.”

WordPress 2.0.2 released – Security update

WordPress v2.0.2 has been released with a number of security updates so it is well worth upgrading.

To simplfy the upgrade process I decided to try generating a diff file between 2.0.1 and 2.0.2 and using that to patch my sites rather than uploading a full set of new files.

Here is the process I took on my local machine to generate the diif file:

  1. Exported both 2.0.1 and 2.0.2 from svn using the following commands:

    To get 2.0.2 - svn --force export http://svn.automattic.com/wordpress/branches/2.0
    To get 2.0.1 - svn --force export http://svn.automattic.com/wordpress/tags/2.0.1

  2. Generated a patch file using diff:

    diff -U3 -r 2.0.1 2.0 > 2.0.1.to.2.0.2.patch

I then uploaded the patch file to my server and placed it in my home directory and applied the patch as follows:
Continue reading “WordPress 2.0.2 released – Security update”