To open in vim all files matching a regex:
$ grep -l foo ./* | xargs vim -p
Data, words, code
To open in vim all files matching a regex:
$ grep -l foo ./* | xargs vim -p
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:
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
I’ve lately been poking around in the UN Comtrade database. This records international trade in detail that is mind-boggling, and I suspect not entirely reliable. So today I learned that:
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
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
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.
I thought the nuclear industry had the best PR money could buy. Maybe not in Japan. Here’s a spokesman of the Tokyo Electric Power Company, managing to make his employer sound as uncaring as possible. He’s talking about the workers inside fukishima, exposing themselves to high radiation levels:
Some people call them heroes. But we don’t think they are heroes. They are doing what they should do as TEPCO employees.
[via the BBC Global News podcast today, though the interview seems a few days older, and is also in the Economist]
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.
MENA net filtering uses Western technology:
At least nine Middle Eastern and North African state censors use Western-built technologies to impede access to online content. ISPs in Bahrain, UAE, Qatar, Oman, Saudi Arabia, Kuwait, Yemen, Sudan, and Tunisia use the Western-built automated filtering solutions to block mass content, such as websites that provide skeptical views of Islam, secular and atheist discourse, sex, GLBT, dating services, and proxy and anonymity tools. These lists of sites are maintained by the Western company vendors. The ISPs also use these tools to add their own selected URLs to the companies’ black lists.
I’m interested here that no Chinese technology is mentioned as being used. This was something I’d been expecting — as had Naomi Klein (kind of) — but which hasn’t come to pass.
As Erich Moechtel has pointed out, much of the European surveillance export industry is surprisingly open. This conference in Dubai in February was more concerned with bugging and individual surveillance, but the principle applies more broadly.
More on this from the TAZ:
Eines der bekannten europäischen Beispiele sei die Firma Nokia Siemens Networks, die beispielsweise Technik in den Iran geliefert habe. “Dort wird diese aktiv zur Repression der Bevölkerung genutzt”, kritisiert Kubieziel. Mittlerweile setzten Länder wie China aber auf selbst entwickelte Software zur Zensur, die sie auch an anderen Staaten weiter verkaufe.
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.