An introduction

This is a semi-public place to dump text too flimsy to even become a blog post. I wouldn't recommend reading it unless you have a lot of time to waste. You'd be better off at my livejournal. I also have another blog, and write most of the French journal summaries at the Eurozine Review.

Why do I clutter up the internet with this stuff at all? Mainly because I'm trying to get into the habit of displaying as much as possible of what I'm doing in public. Also, Blogger is a decent interface for a notebook

Friday, April 29, 2011

To joyfully watch the fumbling coalescence as a community becomes self-aware


He had the sense, at the moment, of groping for intellectual support, of casting about and dimly receiving a hint here, a hint there. Like a radio technician delicately picking signals out of background static, he'd learned to recognise voices worth listening to, voices that meant something distinct even when they ued hte same compulsory words as everyone else. Here and there, people were speaking with secret passion


-- Francis Spufford, Red Plenty p.65

Friday, April 22, 2011

Cory Doctorow on the joys of writing for teenagers:

That's one of the most wonderful things about writing for younger audiences — it matters. We all read for entertainment, no matter how old we are, but kids also read to find out how the world works. They pay keen attention, they argue back. There's a consequentiality to writing for young people that makes it immensely satisfying. You see it when you run into them in person and find out that there are kids who read your book, googled every aspect of it, figured out how to replicate the best bits, and have turned your story into a hobby.
...
young people live in a world characterized by intense drama, by choices wise and foolish and always brave. This is a book-plotter's dream. Once you realize that your characters are living in this state of heightened consequence, every plot-point acquires moment and import that keeps the pages turning.

Wednesday, April 20, 2011

Next in the continuing saga of Rolling Stone printing surprisingly good long-format journalism: The Stoner Arms Dealers.

Packouz was baffled, stoned and way out of his league. "It was surreal," he recalls. "Here I was dealing with matters of international security, and I was half-baked. I didn't know anything about the situation in that part of the world. But I was a central player in the Afghan war... It was totally killing my buzz. There were all these shadowy forces, and I didn't know what their motives were. But I had to get my shit together and put my best arms-dealer face on."


The author, Guy Lawson, seems to have written a string of in-depth articles on international crime in Rolling Stone.

Although you suspect Rolling Stone is also dropping serious money on lawyers, to let them say things like:

The Albanians cut him out of the deal, informing AEY that the repackaging job would be completed instead by a friend of the prime minister's son. What Trebicka had failed to grasp was that Thomet was paying a kickback to the Albanians from the large margin he was making on the deal. Getting rid of Thomet was impossible, because that was how the Albanians were being paid off the books.


I suspect part of the reason Rolling Stone can support this kind of journalism is that they force their writers to be entertaining. Not only does this mean people read and appreciate the long-form articles (and thus build demand for more of them), but it forces the writers to properly get to grips with their subject.

Monday, April 18, 2011

open matching in vim

To open in vim all files matching a regex:
$ grep -l foo ./* | xargs vim -p

Forced-labour asparagus

Adrian Mogos describes the use of forced labour in Central European. They were producing food for Tesco, among other outlets:

Corina says they worked in the fields under Ukrainians carrying shotguns who hit anyone that dared ask about the wages they’d been promised or protested over the conditions and hours.
Around 400 hundred men and women were kept working around the clock, sleeping in a dormitory, and they were not allowed to leave the fields unless their Ukrainian bosses transferred them to constructions sites or slaughterhouses.
...
After two months of working for free under these armed guards, Corina knew she’d never get any money. When she and her husband protested, they threatened to sell her off to a pimp to work as a prostitute in Prague. Finally, she, her husband and one brother-in-law fled the camp by night in the summer of 2008.

Sunday, April 17, 2011

vim outliner (snippet)

Vim has a plugin for outlines, clearly described here. Create a file with the extension otl, and you'll get some visual help in managing an outline.

Whitespace denotes indentation level, colons mark text content. It builds on the vim folding commands:

  • zc: collapse hierarchy

  • zo: expand hierarchy one level

  • zO: expand hierarchy all the way

  • [z: move to header (]z move to next header]



There are also some commands specific to vimoutliner. these are introduced with a double comma, and listed in the documentation

Finally, it's possibe to get ascii checkbox functionality, a little like emacs org-mode. This requires installing a plugin-for-the-plugin, and I've not yet tried it. Details in :help vimoutliner

The real get out of my head command is this perfect incarnation of my own notation for marking tasks as done:

,,T normal Pre-pend timestamp (HH:MM:SS) to heading

Friday, April 15, 2011

HTTP authentication (snippet)

And the reason for that faff is to start using this blog more to keep track of snippets of code and config that I'm constantly re-using. That is, the things you have half inside your head anyway, but need to look up exactly what the command is.

One from today: setting up basic HTTP Authentication with Apache:


vps:/etc/apache2/sites-enabled# htpasswd -c /etc/apache2/anaad.passwd admin
New password:
Re-type new password:
Adding password for user admin



edit .htaccess:

AuthType Basic
AuthName "Anaad"
AuthUserFile /etc/apache2/anaad.password
Require valid-user

Syntax Highighting

Whenever I try to put code snippets up here, I end up frustrated that they turn up deprived of any highlighting. So I've tried following these instructions to fix things. With luck, this post should be an example ;)

So this goes in <head>:




And for the highlighted text you have 2 options.

First is with <pre> tags:


or a slightly more longwinded version, which provides for escaping of html tags:


<script type="syntaxhighlighter" class="brush:html"><![CDATA[ <a href="http://exampe.com/blah">blah</a>]]</script>


This, alas, interacts badly with blogger's pre-posting HTML validation. It's easier to handle the escaping from the command-line beforehand:


$ xclip -o | perl -MHTML::Entities -ne 'print encode_entities($_)' | xclip

Monday, April 11, 2011

The education scam

Oh boy, I find myself agreeing with Peter Thiel:

Instead, for Thiel, the bubble that has taken the place of housing is the higher education bubble. “A true bubble is when something is over-valued and intensely believed,” he says. “Education may be the only thing people still believe in in the United States. To question education is really dangerous. It is the absolute taboo. It’s like telling the world there’s no Santa Claus.”

Like the housing bubble, the education bubble is about security and insurance against the future. Both whisper a seductive promise into the ears of worried Americans: Do this and you will be safe. The excesses of both were always excused by a core national belief that no matter what happens in the world, these were the best investments you could make. Housing prices would always go up, and you will always make more money if you are college educated.

Thursday, April 7, 2011

Gambling in Azerbaijan

RFE/RL:

The ban on gambling dates back to a 1998 scandal involving the current president of Azerbaijan, Ilham Aliyev. Media reports claimed that he lost up to $6 million to a Turkish businessman while gambling in a nearby country.
Aliyev's father Heydar, then president of the oil-rich country, denied the charges and promptly banned casinos and gambling activity in a morality drive.

Monday, April 4, 2011

Sally Bowles wakes up screaming

Sheila O'Malley is still one of the most powerful writers around:

And so when Liza Minnelli sings "Life is a cabaret, old chum," there is a crazy hope behind those glittering scary eyes. The world is about to end. Everything is about to fall apart. Bowles has been in bed with the wrong people. The waking-up-screaming is coming, but until that day? She plants her legs wide apart on that empty stage, and wails out her life force, defiantly declaring her belief that the party was worth it. In a strange way, Minnelli's version can be seen as a triumph. At least from Bowles' perspective. That's why it's such a good performance. It's complicated. There are no easy answers. Bowles launches herself, willfully, above the horror in that moment, and insists—she insists, all evidence to the contrary, that life IS a cabaret. She will not have it any other way. But when you think about the wider picture of what is happening in Europe at that time, that mindset becomes disgusting, soulless.