I recently wanted to create an application to allow uploads to a website, in the simplest possible way; so I made a little BASH script which used cURL to post the files to the server. Then with a little Platypus (mixed up with CocoaDialog) magic, I ended up with a droplet style application. If you're a scripter, and want some application magic then do check it out.

SteamSHIFT out.

Technorati Tags:
mac, osx, developing

So, Daniel Jalkut of Red Sweater Software has taken over development of MarsEdit (in my opinion the best Blog editing software for the Mac). He's pretty keen to get cracking on making it even better, so I put in my 2 pence worth - a feature request for TextMate integration …

Turns out, there are 2 ways of accomplishing this; 1. set TextMate as the external editor for MarsEdit, then just create (or click to edit your post) and hit command-J (File -> Edit with TextMate); 2. Install the ‘Edit in TextMate…’ bundle, which will allow you to edit any text from any Cocoa application in TextMate.

Woohoo! How easy is that?!

SteamSHIFT out.

Technorati Tags:
mac, osx, cocoa, textmate

It was certainly an experience! And not one that I have any desire to repeat …

I decided that it would be a good idea to upgrade my web and email server to OS X Server 10.4. Partly because I was struggling to get spam filtering working as well as I wanted, and partly because I wanted to upgrade to PHP 5.1.4 and the excellent packages for PHP produced by Marc Liyanage no longer support 10.3. Also, I figured that by 10.4.6, the OS is stable enough for a production environment. It also helped that I was able to procure a cheap copy via ebay!

Technorati Tags:
mac, osx, server, installation

So, off I went to London to sit in the data centre and do the upgrade. I booted the X-Serve into firewire target disk mode and booted my laptop off that. I then loaded in the new disk and started the upgrade. The upgrade went fine and so I booted the machine up, and logged in via vnc to make sure I had all the latest system upgrades and so on. This is where the problems began…

I installed the upgrades and restarted, but the machine didn‘t come back up. As a guess, I’m thinking that what happened is that the time it takes to complete the 10.4.6 upgrade (post restart) was so long, that I assumed something had gone wrong and manually restarted it again; thus mashing that upgrade.

There I was with my web server, with a mashed OS. OK thought I, we‘ll do a clean archive and install of the OS; no dice - that option doesn’t exist for OS X Server. What to do?

A bit of negotiating later, and I had procured a new hard disk to fit into the second bay. A complete reinstall later, and the machine was running once more. This time I did the OS upgrades whilst booted from the laptop. It really does take a long time to restart (twice) after the 10.4.6 upgrade. And from there I was able to copy all of the web sites and so on over to the new disk.

I went through and set up all the sites once more and was finally left with a working web server. I decided I would get email running properly when I got home. This was the second mistake. More to the point, the second mistake was wanting to copy the netinfo database from the old install to the new to save me recreating all the users. This process can only be done in single user mode, and if anything goes wrong, you need to be in single user mode in order to recover. And the problem with single user mode is that it requires that you are on site! This is not something you want to get wrong as breaking the netinfo database means you are locked out - very very not good.

My second trip to London to fix the server was much more brief. A quick trip into single user mode confirmed that the netinfo database from the old install was completely borked, but I was at least able to restore access once again.

Finally, back home once again, I was able to recreate all the users and get email running correctly.

So, here are my hard learned top tips for doing an upgrade like this …

  • Start the process with a second drive; whether you decide to do a full install from scratch or copy your existing set up to the new drive and do an upgrade, it's so much better to have your original (working) copy of the system on a second drive that you can roll back to.
  • If you can, build the whole new system on a drive before you even get to the data centre - you'll still need to copy across any changed files, but at least you are not taking out the machine for any length of time. This does raise one question though - how can you work on an x-serve drive, without having a second x-serve?
  • Do any netinfo work, whilst you are at the data centre, and sat in front of a terminal - if you can‘t, don’t try!!
  • Have you covered all bases in terms of backups? I thought my backups were pretty comprehensive, but I've had to re-evaluate. For instance, it is possible to create plists from server admin of the setup (and via the command line). And also of the user setups; these will take some of the pain out of having to rebuild from scrtatch.
  • If possible, do system upgrades via firewire target disk mode … or at least be very patient before restarting the machine! I knew for instance that it restarted twice after the 10.4.6 upgrade, but I wasn't prepared for it to take so long.

Fortunately, in the end the server wasn't out for hugely long, and everything is running really nicely now. I have learned some good lessons and my inbox is vastly less spam filled now.

SteamSHIFT out.

My (fairly new) MacBook Pro had developed some rather tedious behaviours such as sometimes not going to sleep when the lid is shut or not waking up when asked to. Also wireless networking performance had been rubbish…

So, figuring they were hardware problems (a friend had many hardware problems with his first revision MBP), I backed up the whole machine, ready to go off to Apple for repair … I thought I'd also reinstall the OS whilst I was at it.

Hey Presto, sleep problems solved. Wireless networking problems solved. Bonus. I‘m just going to have to be very careful about what software I put on in the future … I’m guessing it was a 3rd party app, that wouldn't shut down properly or something.

Technorati Tags:
mac, osx, how to

I finally tried out the Firebug extension for Firefox; man it‘s good. Almost enough to make me switch to FF full time. As a web developer, it’s simply indispensable once you've started using it …

Firebug integrates with Firefox to put a wealth of development tools at your fingertips while you browse. You can edit, debug, and monitor CSS, HTML, and JavaScript live in any web page.

Combined with the GrApple (Eos Pro) theme, Firebug is making a good case for me to switch … if it wasn't for the very un-mac behaviours like not using the keychain.

So, for now I'll keep playing the dual browser game; Safari still rocks (apart from being a bit of a resource hog).

SteamSHIFT out.

Technorati Tags:
mac, osx, developing, web development, browsers, firefox

Presenting Version 1.3 of my Wordpress Category Cloud widget. This one is compatible with Wordpress 2.1 (use Category Cloud Widget Version 1.2 for earlier versions of Wordpress). As before, the credit goes to sw-guide.de for the original Category Tagging plugin on which this is based; and also Alex for getting a version of this running under 2.1.

NB: Unlike Alex's version, this widget is self contained and does not require the Category Tagging plug-in.

SteamSHIFT out.

Technorati Tags:
php, wordpress, widgets

Custom USB Keyboard for Controlling Ableton Live

I just finished reworking an old USB QWERTY keyboard to serve as a custom keyboard for controlling Ableton Live, and thought you might like a look. The whole thing is well-documented with photos and comments at my Flickr site:

flickr set: Custom keyboard for Ableton Live

The basic idea: instead of buying an expensive controller to expand my tactile control of Ableton Live (or building something custom with MIDI controllers), I decided to use an old USB QWERTY keyboard and custom-paint it to enhance its use as a live performance device.

The big idea behind the keyboard is that the humble QWERTY keyboard offers a ton of control possibilities, thanks to the flexible keymapping capabilities of Ableton Live. I‘ve been using the built-in keyboard on my Powerbook for a while now to trigger clips in performance, but it’s tough for a couple reasons. First, it looks like you‘re writing e-mail during a show, and that’s kinda boring. Second, all the keys look the same (minus the markings, of course) - there's not much that lets you navigate easily in low-light conditions and in the heat of the moment on stage.

You can see a full write-up here:

custom USB QWERTY keyboard for Ableton Live [Ableton forum]

Simple and yet effective!!

(Via createdigitalmusic.com.)

Cheap acoustic sensors make surfaces interactive

New Scientist has an article on turning any surface into a touch screen using small piezoelectric sensors to sense surface vibrations -

_"A series of acoustic sensors that turn any surface into a touch-sensitive computer interface have been developed by European researchers.

Two or more sensors are attached around the edges of the surface. These pinpoint the position of a finger, or another touching object, by tracking minute vibrations. This allows them to create a virtual touchpad, or keyboard, on any table or wall."_ [via] - Link.

(Via MAKE Magazine.)

Tiilt!

… I don‘t own a Wii. But as of today I do own a Wii Remote (and a nunchuk). And I’ve had a lot of fun using the Wiimote.framework to hack up this app:

Tiilt.mp4

This screencast shows a simple Quartz Composer composition being manipulated by the Wii remote. If there is interest I'll put the source online. …
toxicsoftware.com

Copyright © 2013 - Brothers Bennettw - Powered by Hexo
- Ported theme GreyShade -