Recently in Technology Category

Over at Pharyngula people often ask how to install killfile, which selectively hides comments in blogs.

Here's how.

First, it's assumed that you're running Firefox. AFAIK, there is no analogous functionality for other browsers (please comment below if you know otherwise).

Now:

  1. Install the Greasemonkey user script extension.
  2. Restart Firefox
  3. Install the killfile script by clicking on the large black Install this script button at the top of the page.

Now, when you load a page on ScienceBlogs (and any of several other blogs) each post will have two new bits of hot text in the Posted by: line: [kill], which hides all comments by this poster in every thread; and [hide comment], which hides only the single comment.

In place of a hidden comment, a one-line notice appears saying “Comment by User Foo blocked [unkill] [show comment]”. Clicking on [unkill] reveals all of the posts by that user; clicking on [show comment] reveals just the single comment.

Over at Pharyngula, people regularly ask how to format posts in particular ways. Here's a rough guide to the half-dozen most common things people want to do.

In all cases, you use HTML (or HTML-like) tags, which (with a few exceptions) occur in opening/closing pairs with your text in between, like this (for an imaginary tag “foo”): <foo>some text</foo>. You have to be very careful to get the syntax right or you will get unexpected results. Preview is your friend.

Quoting

In order to quote a previous text, use <blockquote>. If you write

“<blockquote>John McCain is a tool.</blockquote>”, it comes out looking like this (indented and possibly with other decoration, such as a bar down the left):

John McCain is a tool.

Italics

You can get italics with <em> or <i>, like this: “John McCain is <em>definitely</em> a tool” produces “John McCain definitely a tool”.

Bold

You can get bold with <strong> or <b>, like this: “John McCain is <strong>definitely</strong> a tool” produces “John McCain definitely a tool”.

Strikethrough

You can strike text with <s>, like this: “John McCain is <s>not</s> a tool” produces “John McCain is not a tool”.

Underline

You can underline text with <u>, like this: “John McCain is <u>such</u> a tool” produces “John McCain is such a tool”.

Links

You can produce links with <a>. The text to be linked appears between the elements, and the URL appears in the href attribute. “<a href="http://www.google.com/">Google</a>” comes out as “Google”. Note that the quotes around the URL and the http:// are not optional. Also, including more than a certain number (2 or 3) links may result in your comment being held for moderation as an anti-spam measure. Preview is your friend.

Physical vs. Logical Markup

Not that it makes much difference in the tag soup that is the blogosphere, but to satisfy the pedants, I should note that the <em> element is preferred for emphasis and <i> for non-emphatic italics. Similarly, <strong> is preferred for strong emphasis and <b> for non-emphatic emboldening.

On Ubuntu 8.04 “Hardy”, the ATI Catalyst 8.4 Driver .deb packages for amd64 will build from the ATI download, but one of the four packages, xorg-driver-fglrx_8.476, will not install out of the box when you try to install the packages in the usual way.

The problem is an error in the preinstall script for the package. In a Debian package, one of the things that a package script sometimes does is “divert” files. The idea is that a package can specify that any attempt by a future package to install a file having a particular name is to be handled by renaming the file to something else, or diverting it. In this way, a package can protect files from being overwritten without causing another package to fail to install. If you have customised a package-supplied file, which might be overwritten by a package upgrade, you can use dpkg-divert to protect your version.

The ATI xorg driver package uses this facility to stop MesaGL, a software Open GL renderer, from overwriting the ATI hardware drivers. That's a good thing, but the problem is that the preinstall script diverts two files to the same target. In other words, it says “instead of installing /foo/bar, rename it /foo/quux” then a second later, “instead of installing /foo/baz, rename it /foo/quux as well”. That's not allowed (because it's obviously stupid).

This accounts for the seemingly bizarre error-message that xorg-driver-fglrx_8.476 is trying to divert to a file target that it, itself, has already diverted another file to!

I suspect that the person who wrote the script copy'n'pasted the line, remembered to edit the filename to divert, but forgot to change where it was diverted to. An easy, if silly, mistake to make. ATI have made a lot of progress in providing decent Linux driver, maybe we shouldn't be too hard on them for lousy QA.

The fix follows below the fold…

Boot Process

Ubuntu has abandoned inittab in favour of their homegrown upstart, not in itself a bad thing, but as shipped it is not configured in such a way that some very useful behaviour of inittab is replicated.

I have a MediaWiki wiki (the same software as Wikipedia) running on polacksbacken.net. I want other people in the University to be able to create accounts on the wiki and use it, but not those outside.

So, I enabled email confirmation in MediaWiki, but after a while, I found that spammers had created accounts but, because they never confirmed them via email, never spammed any pages. Still, it was irritating and MediaWiki provides no way of stopping it, so I resolved to ensure that an email address in a particular domain is specified at signup-time.