App Store not updating apps?

Mac App Store not updating your apps with “Please login to the account you purchased with” type errors? The simplest fix seems to be to just delete the app from your Applications folder. Refresh the Purchased page on the Mac App Store and now instead of Update, its button says “Install” (well, on mine it says “Instalar”, so whatever language you’re in.)

Seems to work consistently for me…

[Update: title changed to reflect how a human speaks…]

Drop the BOM

[Update 2011-12-20-120457: see end of post]

I sometimes get issues with files that come in from another source, that have the BOM – usually from some other web developer who’s using Windows.

It’s not a massive issue, but often introduces space that you can’t see except in the browser where it can break some designs.

One problem is that vim and most (all?) graphical editors don’t show it to you so you can remove it, so you usually have to shove it through perl or something. Another method that’s extremely easy to use is to edit the file in nano. I’m not a massive fan of nano, but what it gives you in this case is the ability to see the BOM as what looks like a single space at the start of the file, so you can delete it very easily. Handy.

Update:

There’s an even easier way, just in vim; not sure what from version this became available.

Check to see if you have a BOM:

:set bomb?

Get rid of it:

:set nobomb

Something I always forget when setting up the post-receive hook for a new git repo

Catchy title for a blog post, huh?

Anyway, something I always (or almost always) forget to do every time when I set up a new git repo and set up the hook to send everyone an email on each git push is to edit description so the first email always starts “UNNAMED PROJECT” which drives me mad!

The full list of steps for setting this up I take are:

cd {git dir}/hooks
mv post-receive post-receive.bak
ln -s /usr/share/doc/git-core/contrib/hooks/post-receive-email post-receive
vi config # edit the config to give the hook an email address (see below)
vi description # *that* step - edit this to have your project name

The config should have something like this in it:

[hooks]
mailinglist = bunch-o-gits@example.com
emailprefix = "[URA git] "

which will send it to a list you need to set up and give you something by which to filter the emails.

Later, gits!

[Update: that line linking to the post-receive-email script might be a bit Debian-specific, not sure…]

Amazon Web Services

I’m suddenly working with a few different AWS setups. I definitely like the flexibility and sheer scope of it. But that’s where its biggest problem comes from: the learning curve is considerable, just based on the massive number of services Amazon offer in AWS. Once up the curve, it’s actually all very simple to work with.

FWIW, I’m using a RightScale Debian AMI which Just Works. And lets me not have to change the chip on apt vs. yum and so on.

I have a feeling I’m going to posting more on the subject of AWS…

Adding extra IP addresses to Debian

I was just asked to add a new IP address to a Debian cloud host. It’s a simple thing, but depending on how often – or how seldom – you do it, you often still need to look it up to remind yourself. So, having previously decided to do a post every time I do something like this (for my own benefit as much as anything) here’s what I did…

Edit /etc/network/interfaces – obviously you’ll need to be root or sudo it.

There will probably something like this in there:

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp

The first chunk is the loopback interface, but the second chunk is the ethernet (eth0). The final line might be dhcp or it might be static, followed by more lines to describe the IP, like this:

iface eth0 inet static
    address 209.85.147.147
    netmask 255.255.255.255

To add a new IP – let’s imagine it’s ‘209.85.147.148’ – to the same ethernet interface, just add something like this:

iface eth0:0 inet static
    address 209.85.147.148
    netmask 255.255.255.255

The “:0” is the extra bit we added. Then restart your networking:

/etc/init.d/networking restart

(keeping your fingers crossed you didn’t make any mistakes that might then lock you out of your host completely, of course ;)

Bluetooth headphone adaptor

This has been one of my better buying decisions recently. I was looking at Sennheiser Bluetooth headphones, but as I have a few pretty decent ear-canal phones, Sennheiser headphones and others it seemed a little wasteful. So I started looking for a BT adaptor. Sony devices were getting good reviews, so I looked at the MW-600. Reduced from 50 squid on Amazon to 35, it was surely worth a punt… And it was. I’m loving it.

I was expecting the included earphones to be a throwaway, but actually, they’re pretty good. They’re certainly not accurate, per se, but tuned to be enjoyable, rather than precise. They’re on a very short cable which is good for not getting it wrapped around you or snagged on anything. (It’s so short I can barely focus on the screen at full stretch!) Pretty cool being able to put the iPad back in my bag and keep playing, with full control as well.

You can have it paired with 3 devices, so you can switch between them without any drama. I’ve got it on iPad, iPod touch and Macbook, and it’s seamless.

The only thing that’s a bit annoying is that the volume control – a touch-sensitive affair – is a little bit fussy. Sometimes I struggle to make it change, and sometimes it shoots to maximum or minimum volume almost instantly.

Like I said, this has been a good buying decision, and cheap as chips.

exim vulnerability fun

Lots of fun over weekend for admins with not-quite-latest exim… I’m getting emails from various services saying their user information databases were compromised, which I assumes related to the rootkits that the vulnerability allows you to install. Which makes me wonder: how many sites are storing passwords unencrypted? If a user database is compromised, and the passwords are encrypted, it would only really affect people with stupid passwords. Anyway, here we go again, changing logins on god-knows-how-many systems…

IE6 CSS – let them eat cake?

An interesting idea is presented on “for a beautiful web” regarding how best to deal with IE6 and its many failings. Universal Internet Explorer 6 CSS proposes that IE6 always gets sent a standard look and feel, so that the experience for its users is not bad – just not the full shebang. It’s clear it has been designed, rather than sending plain CSS-less HTML, but it’s very sparse.

Personally, I like the idea. I have done something similar on more than one occasion. I haven’t taken it to the same level, possibly, but I’ve treated IE6 in a similar way to how I treat screen readers for example: make sure all the content is available, and is usable. What follows are a couple of screen shots of redamc.com, first from Safari 4, then from IE6. (The Safari 4 shot is representative of all modern browsers, though.) The design basically revolves around having all the content on one page, in nicely scrollable boxes. In IE6, this was not well supported, and the decision was taken to make the layout more “blog-like”. All the content is the same, however.

First, Safari 4:

>safari4screenshot.jpg

And IE6:

>ie6screenshot.jpg

iPhone SDK 3.0 beta 3

Beta 3 is out and the new OS fixes the non-working Youtube from the previous beta.

[Update: and also breaks syncing, which now hangs on “Syncing contacts…”]

[Update2: Seems like the contacts syncing hang was a temporary issue…]