• Installing a new hard disk in a Mac = not fun

    So I had to upgrade my mac hard disk. 12 months and I filled the 320Gb disk so I treated myself to a Seagate Momentus XT 750Gb disk.

    It has NOT been fun. Problems so far include:

    Initialise disk over the internet and restore from TimeMachine – fails to restore the recovery partition so cannot use FileVault2. Correct way: initalise disk over the internet and reinstall OS X Lion with a new temporary user that has a different user name (not one that’s within your TimeMachine backup). Then restore Mac from TimeMachine, then delete temporary user to keep things tidy.

    BootCamp has been a nightmare. I eventually bought WinClone which has made things slightly easier. I got dual boot working, then setup FileVault2 which managed to prevent me logging in to the windows partition. I’m sure I had FileVault2 running before on the old disk with bootcamp and without any problems. Trouble is it takes hours for the encryption process, hours to clone the windows partition, hours to restore the windows partition. I have yet to get that working.

    Now, I want to do some ruby coding and discover TimeMachine doesn’t save my ‘path’ information so Git didn’t work (it was backup up). TimeMachine also didn’t backup my /etc/hosts file (I had entries that weren’t important but finding them gone is a little disconcerting) and at the moment I can’t compile some software for a variety of errors.

    Argghhhh!


  • WordPress redirects

    Moving from movabletype to wordpress has involved several post moving to new locations. The redirection plugin has made adding redirects easy but only once I figured out the correct regular expressions to use. Here’s what I’ve had to use.

    1) Old MT pages had .html on the permalink

    Source: /(d*)/(d*)/(.*).html
    Target: /$1/$2/$3/

    2) A much earlier MT site had pages in an ‘archive’ directory. They also had urls with underscores instead of hyphens the wordpress pages are using, instead of spaces generated from the page title. So some archive entries had one hypen, others had four. I didn’t figure out a singe elegant regex and instead used five to do the job. Note, I couldn’t use “.*” to match as “.” would match the underscores too. The same applied to using the shortcut w as that also matches underscores.

    No underscores

    Source: /archives/(d*)/(d*)/([a-zA-Z0-9]*)/
    Target: /$1/$2/$3/

    One underscore

    Source: /archives/(d*)/(d*)/([a-zA-Z0-9]*)_([a-zA-Z0-9]*)/
    Target: /$1/$2/$3-$4/

    Two underscores

    Source: /archives/(d*)/(d*)/([a-zA-Z0-9]*)_([a-zA-Z0-9]*)_([a-zA-Z0-9]*)/
    Target: /$1/$2/$3-$4-$5/

    Three underscores

    Source: /archives/(d*)/(d*)/([a-zA-Z0-9]*)_([a-zA-Z0-9]*)_([a-zA-Z0-9]*)_([a-zA-Z0-9]*)/
    Target: /$1/$2/$3-$4-$5-$6/

    Four underscores

    Source: /archives/(d*)/(d*)/([a-zA-Z0-9]*)_([a-zA-Z0-9]*)_([a-zA-Z0-9]*)_([a-zA-Z0-9]*)_([a-zA-Z0-9]*)/
    Target: /$1/$2/$3-$4-$5-$6-$7/


  • Results are in, WordPress gets as much spam as movabletype

    That didn’t take long.  Last night I pointed the domain name to the new WordPress server. This morning I had 50 spam comments held for moderation.  I was impressed the spammers had noticed the blog change so quickly, then I thought the robots probably change their behaviour depending on the comment page. Clever those spammers.

    Still, there are plenty of solutions. Before I get into writing some unique code I found a simple plugin. If you want to comment you now have to answer a question. I’ve begun by asking you to type the number 6. You can answer with any of: 6, Six, SIX, six.

    If the spammers decide it’s worth adding that answer to their bots then I can change the question.

     


Search this site


Free apps

  • birthday.sroot.eu – Your birthday or other celebration date based on [years on other planets] / [how many seconds/days] / [how far you’ve travelled around the sun]
  • stampulator.sroot.eu – Calculates the combination and how many 1st, 2nd, large 1st and large 2nd class Royal Mail stamps you need on large envelopes and packets

Recent posts


Archives


Categories