jerous' ::1

Listing of these articles
2012-06-12 [E] [D]
bash,code,linux Comments 0

Sometimes I perform some parameter studies with bash. Having four cores, it would be a shame to only use one of them. One could just background all processes, and let the OS manage it. This will result in bad performance.

It would be wiser to at all times allow at most four scripts to run simultaneously. Bash does not provide such facility. Hence, below is a script which can be sourced.

The script allows tuning the MAX_NPROC parameter, the maximum number of simultaneous scripts.

Available functions are

  • new_job (for regular commands with pipes and stuff),
  • new_job_f (for internal functions),
  • wait_jobs (wait for completion) and
  • kill_jobs (kill all running jobs).

Download ppool.sh, or click the view more link to view the contents.

read more...

Some tables on Wikipedia have quite a lot of rows. If one is only interested in a small subset, then it is difficult to see that subset in one screen.

The following userscript filter.js (tested in Opera, and hence should work in Firefox too with Greasemonkey) adds a textbox for each column in a wikipedia article. Each textbox will filter out rows whose respective column does not match the (javascript) regex.

It should work in

  • Opera <=12 (tested; works natively using userscripts)
  • Opera >=15 (tested; use Tampermonkey or Control-Freak (use inner code of the function, rather than the function)
  • Chrome (tested; use Tampermonkey script)
  • Firefox (untested; use GreaseMonkey)

edit: There is still a bug: when sorting, the filter row gets sorted too.

Test it on http://en.wikipedia.org/wiki/Comparison_of_hex_editors or http://en.wikipedia.org/wiki/Comparison_of_text_editors!

read more...

2012-06-10 [E] [D]
youtube,music Comments 0

Tom Waits has this amazing discography, but one song (of the many) I can keep on listening to, and which I have fond memories of, is the live Burma Shave / Summertime mashup.

Version 1 (is actually a whole show!)

Version 1

Version 2

It features Tom merging the melodies of Summertime and Burma-Shave, a fantastic ramble and homage to Elvis before he goes on to an expanded version of Burma-Shave. Those incredibly powerful and intensely visual lyrics of the piece are abundant as Waits conjures the dark narrative and it concludes with him despairingly singing the lyrics of Summertime in a fantastic contrast to the depressing end of the song. Sublime stuff.

Couldn't say it any better :)

read more...

2012-06-04 [E] [D]
osx Comments 0

Edit: I moved this to its own page

OSX is not my favourite OS, but at work I "have" to use it.

To make it more usable, I have installed some tools, which I'll list here. It will get updates as I find new tools.

read more...

2012-06-03 [E] [D]
music Comments 0

Bill Graham (born Wolfgang Wolodia Grajonca in Berlin) was an impressario and rock concert promotor. He owned a couple of music theaters, like the Filmore West, Winterland and Filmore East, dealt in psychedelic posters, was an actor (Apocalypse Now) etc. In the late 60's he started to meticulously record performances, and archive them, until his tragic helicopter crash in 1991.

Around 2001, Bill Sagan (former CEO of an insurance company, who owns probably he biggest collection of rock memorabilia in the world) acquired the archives. He and his 14-men crew spent two years cataloging and digitizing the musical treasure. We're pretty lucky to have it available:

The concerts were recorded on 3M Scotch tape, which proved incredibly durable. "99.9% of what we have on the website is in mint condition," Sagan said.

-- Selling rock 'n' roll history, one ticket stub at a time

Not all is available for free, but nonetheless, the available material is very interesting and worth a look.

http://www.wolfgangsvault.com/

2012-05-23 [E] [D]
music,youtube Comments 0

Hold On, I'm Coming by Sam & Dave backed by Booker T. & the MGs on the 1966 Stax/Volt European tour. Can that go wrong? No it can't.

https://www.youtube.com/watch?v=WlSgK_lpAHk

The song was written by Isaac Hayes and David Porter, who formed the Stax song writing team during those days. The former was doing his business in the bathroom, when Hayes urged him to come listen to the amazing tune he had just found. Porter shouted "Hold on, I'm coming", which eventually became the title.

2012-05-22 [E] [D]
bash,linux,osx Comments 0

Resolving a path in bash in a cross platform way:

1
2
3
4
function resolve_path {
    cd "$(dirname "$1")"
    pwd
}

or oneliner

1
path="$(cd "$(dirname "$path")"; pwd)";

To get the full path of the current script, one can use

1
path="$(cd "$(dirname "${BASH_SOURCE[0]}")"; pwd  )"
which works regardless of $0's value.

2012-05-16 [E] [D]
youtube Comments 0

Richard Feynmann talking about how deep scientific analysis and understanding does not remove any of the beauty it, but rather adds to the beauty.

He's trying to find out how the world is, rather than how we would want it to be: it's better to live with uncertainty and not knowing, than having answers which might be wrong.

http://www.youtube.com/watch?v=cRmbwczTC6E

Пусть бегут неуклюже (Let Them Run Clumsily), a Russian birthday song. Imho very catchy :)

This version is with lyrics in English and Russian, and is from Cheburashka

http://www.youtube.com/watch?v=nTnGxA6As4I

Пусть бегут неуклюже
Пешеходы по лужам,
А вода — по асфальту рекой.
И неясно прохожим
В этот день непогожий,
Почему я веселый такой.

(Rough translation: Let the clumsy pedestrians run among the puddles. and let the water go across the asphalt like a river. And it's unclear to the passers going by on this foul-weather day, why I am so happy.)

Припев:
Я играю на гармошке
У прохожих на виду
К сожаленью, день рожденья
Только раз в году.

(Chorus: I am playing on an accordion in plain view of the people going by. Too bad birthdays only happen once a year.)

Прилетит вдруг волшебник
В голубом вертолете
И бесплатно покажет кино.
С днем рожденья поздравит
И, наверно, оставит
Мне в подарок пятьсот «эскимо».

(A wizard will probably arrive suddenly in a light-blue helicopter and show a film for free. He'll congratulate me on my birthday and will probably give me a present of 500 Eskimos (refers to a kind of ice cream on a stick))

Listing of these articles
[printer friendly] [static version] [Post listing] [Page listing] [Tags: music tab jazz travel wdb europe code live programming youtube record ]