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:

following irc with inotail

Being always in a several irc channels, it’s helpful to have an overview of what’s going on without tabbing through a dozen windows. Fortunately I can follow the logs using inotail:


$ find /home/dan/.purple/logs/ -name "`date +%F`*" | xargs inotail -fv

This would also work with tail — the only problem is that _tail_ with so many files would put some strain on the filesystem.

urban agriculture

Via robokow, news of plant cultivation in an old IBM typewriter factory:

The location for the first commercia nursery in the world in an office is the former IBM typewriter factory on Johan Huizinga Avenue. The large factory building has already been empty for eleven years

It goes without saying that this is an area where the cannabis cultivators have a *big* headstart
:)

Stuxnet under the bed

Botnets are convenient enemies, providing justification for the introduction of spyware and restrictions on computers.

Walter and Amelia have good posts on the subject, particularly in South Korea.

South Korea, it seems, is further along a path that can be expected also in Europe and elsewhere. The country’s infrastructure has repeatedly been attacked by botnet-fuelled DDoS. These attacks strengthened demand for official regulation:

Popular support is rising for a helpful Zombie PC Act giving a government-controlled authority the mandate to access and scrutinize commercial, official and private datasystems. The authortity will help the government determine if the system is infected by any potential virus. Lacking appropriate anti-virus software shall, according to the bill, lead to repercussions.

That is, there would be a requirement for official intervention in every computer. With intervention comes inspection. And thus, the threat to alarm the paranoid — a sideways approach by which governments could seize computers. Walter:

Your computer may become a target for a serach (and seizure) just because it is a computer. The cherry on the cake is of course that we also should expect governmental bodies to take enough care that backdoors installed for this very purpose will not be abused by those very nefarious people, the Zombie-operators, it aims to fight. To quote Top Gear: what could possibly go wrong?


ETA

: Amelia has another post, laying all this out much more clearly.

playing mp3s in orer

I often use mplayer to play all files in a directory:

mp ./*

*mp*, by the way, is simply an alias for mplayer, used to play things faster and with speed control:


$ which mp
mp: aliased to mplayer -speed 1.21 -af scaletempo=speed=tempo

But what if I want to play them in date order? (useful to replay a stream with streamripper). I need a shell loop. A for loop will choke on filenames with spaces

:


$ for i in `ls -tr`
do
mp "$i"
done

A while loop seems to give me some problem of mplayer reading too much from stdin:


$ ls -1tr | while read i
do; mp '$i'
done

So I end up using an array:


$ mp3files=( ./*mp3 )
$ for d in "${mp3files[@]}"; do
mp "$d"
done

phew! that was

far

too much work