Untitled

In less wanky news…

I’ll be in London next week, Thursday to Sunday. Then off to Bristol for a couple of days.

Let me know if there are things I should be going to!

Firefox switch to tab

FF4 has a feature by which, when you try to open a second copy of a page, will flip to the existing tab rather than re-opening it.

This drives me crazy.

I usually have several dozen tabs open, across multiple screens, some not visible. When I re-open a tab I want it to appear right in front of me. Not (as happens now) to be brought to the front of a window I can’t even see.

this blogpost offers some solutions, most of which don’t seem to work.

What

does

seem to work is adding some junk to the end of the url. A hash should do it, or in extreme cases a hash followed by some random characters.

More B&T

More B&T:

BRIC – MIST – MAYHEM: “

the creation of random geopolitical blocs is kind of fun. I mean, if you group Mexico with Afghanistan, Yemen, Haiti, Egypt and Moldova then you have MAYHEM; as indeed you do.

Libyan nukes:

Actually, come to think about it there seemed to be a fair amount of ritual involved in Libya giving up its nuke programme.

Step one: Libya buys a bunch of stuff from the Khan network

Step two: Libya hands it over and renounces its programme

Stepo three: Welcome to the international community! Here’s a guy we jugged earlier.

I always wondered if step one was taken in anticipation of taking step two.

On Torygeddon

it’s important not to get paranoid about this. Just because the management of the economy resembles something from a political science textbook about the period of destabilisation engineered to lay the groundwork for a coup doesn’t mean that it’s actually happening that way.

On Tunisia: “

It obviously wasn’t a twitter revolution, or a wikileaks one for that matter. It was a “man burning himself alive in despair” revolution. The only thing digital about it was when he flicked his bic

Empire numerology: “

So, Britain as superpower, 1759-1945. US as superpower, 1919-2008. USSR as superpower, 1945-1989. Clearly there’s a pattern here; each new power lasts approximately half the length of its predecessor. ..Unfortunately, this only gives the Chinese from 2008-2033 or thereabouts. Which sounds about right for a really serious demographic/elite incompetence crisis. India and Brazil only get 12 or 6 years, and at some point in the 2050s the world order starts to move like a singulatarian’s fantasy

ad-hoc webserver from the shell

Here is a neat trick to make the current directory hierarchy available online:



$ cd /tmp

$ python -m SimpleHTTPServer

Serving HTTP on 0.0.0.0 port 8000 ...

Quickly creating a shell script

Suppose you want to create and run a short script. It’s often faster not to bother opening up a text editor. Instead, use shell history to write a file, then chmod and execute it:



$ cat > /tmp/me.py

#!/usr/bin/env python

print('hello world')

$ chmod a+x !$

chmod a+x /tmp/me.py

$ !$

/tmp/me.py

hello world

$

The Hijab is anti-european

Azerbaijan has banned wearing hijabs in schools.

In a move some say is

designed to bring the secular predominantly Muslim country closer to Europe

, Azerbaijan follows a number of other countries in banning religious head scarves in schools. It also follows the closure of several mosques late last year under a new law on religion.

Don’t you feel proud of the European export of tolerance?

[there’s a very similar dynamic behind Turkish regulation of the hijab, and Turkish secularisation in general]

Qatar arms to Libya

The New York Times reports that:


for the first time

, Qatar put the question of supplying arms to the rebels on the table, but no agreement was reached.

Well, not really for the first time. Qatar has been pushing for arms shipments to the rebels for a long time:

“If they will ask for weapons, we’re going to provide them,” the amir, who is on a visit to the United States, told CNN in an interview. [xinhua, 15 April]

And the New York Times itself has reported on the rebels receiving foreign weapons, and speculated that Qatar is one source of them.

Kenneth Rexroth

Bruce Sterling, Kenneth Rexroth. Rexroth was columnist in the San Francisco Examiner, through the 1960s. Elegant, thoughtful, panoramic. While I don’t

quite

share Sterling’s enthusiasm (“

there are no blogs this good

“), there’s good stuff here:

Looking back, it seems now that most of our crises have been crises of talk. We have been able to take it out by abusing each other. That is just dandy. Nobody pushed those banks of buttons over the U-2. The Chinese have not invaded Laos or Taiwan. The Marines have not landed in Cuba. The Congolese seem to be tiring. The UN proved able to cope with Khrushchev.

Who knows? We may talk ourselves out of the woods yet.

vim: firefox-like tab controls

I approve of this tip to make tab navigation in vim the same as with firefox. Life is too short to memorize multiple sets of commands.


:nmap :tabprevious
:nmap :tabnext
:map :tabprevious
:map :tabnext
:imap :tabpreviousi
:imap :tabnexti
:nmap :tabnew
:imap :tabnew

Getting server messages via irc

irccat is a bot designed to facilitate sending server messages to an irc channel

The irccat bot joins all your channels, and waits for messages on a specified ip:port on your internal network. Anything you send to that port will be sent to IRC by the bot. IRCCat – as in, cat to IRC.

Using netcat, you can easily send events to irc from shell scripts:

echo “Something just happened” | nc -q0 somemachine 12345

That will send to the default channel only (first in the config file). You can direct messages to specific combinations of channels (#) or users (@) like so: