Sun Apr 29 19:06:44 CEST 2012

Miscellanea

To calculate the average or the maximum of the second column of data files, do

awk '{sum += $2} END {printf ("%f\n", sum/NR)}' $1

or

awk 'BEGIN {max = 0} {if ($2>max) max=$2} END {print max}' $1

The latter one is particularly useful for a quick-and-dirty plot of normalized spectra with gnuplot.




The easiest way to get the geometry of an image is

identify -format "%wx%h\n" *



To enable applications requiring X to be started with root rights without having access to kdesu or gksu, steal the magic cookie from your users :D

xauth add `xauth -f ~user/.Xauthority list $DISPLAY`

Posted by cobra | Permanent link | File under: linux

Mon Apr 9 19:10:40 CEST 2012

Scale

mogrify -resize x240 -quality 85 *.jpg

Posted by cobra | Permanent link | File under: web, presentations, mathematics, latex

Mon Apr 9 18:48:35 CEST 2012

Library

One reader has suspected the "little tablet-like thingie" underneath the laptop on the left of the network diagram one post below to be an iPad. Let me assure you: it is not an iPad.

It is in fact an e-book reader, and more precisely a Kobo Touch which I've acquired around Christmas:

top view top view top view

At that time and in this country, only Kobo and Sony offered what I wanted, namely WiFi access, a touch screen and the latest display technology. But I wouldn't have bought a Kindle anyway: Amazon's infrastructure reminds me of Apple's, and I strongly prefer an open attitude to the rest of the world (including an easy access to e-pubs without the need for calibre).

Am I satisfied with the Kobo? More than I anticipated. I still prefer real books for their tactile and olfactory feedback, but one can't possibly argue with a 185 g device holding an entire library. Having a search function, a dictionary and a built-in shopping solution doesn't hurt the case either. It is a new dimension of reading, period. And the Kobo utilizes this dimension quite nicely, I think.

Speaking about niceties: when you look at the photographs above, you're probably surplussed about the cover I've chosen. Really looks like a wash-glove, doesn't it? Yes, but it does so only from the outside! Inside it is made of carbon and titanium. It has an invisible organic solar module which supplies sufficient power for the Kobo to last indefinitely, and built-in organic LEDs which provide a dimmable reading light in the night.

Naaaa, it's just a wash-glove. :D The manila cover I actually bought gave off such a putrid stench that I couldn't use it. It's unbearable, and overpowering even after three month and a machine wash. Well, I love the glove. It's made of bio-cotton, fits perfectly, and attracts a lot of attention in the subway.


Posted by cobra | Permanent link | File under: thoughts, info, hardware

Sat Apr 7 14:51:08 CEST 2012

Archeology

After acquiring a gigabit switch and a network attached storage (NAS), I was forced to admit that my computer installation has a definitive SOHO scent. In fact, one finds quite a few of the essential concepts and elements of a "real" network:

For example, there is a router, a firewall, a switch, a wireless access point, a RAID 5 NAS, and clients connected either by the Gbit link of the switch or wirelessly by the router. There's also an all in-one printer, scanner, and copy machine. In a professional network, dedicated devices would take care of each of these services, but the intended functionality is the same (albeit here at a much smaller scale).

How the hell could that happen to me, who doesn't even have a smartphone and whose plasma TV cannot display 3D contents? How?

Let's see how this madness started.

1987: Schneider PC1512, CPU 8086/8 MHz, 512 kB RAM, 10 MB HDD, MSDOS 3.3
Highlights: Compiling my Pascal programs at home instead of waiting hours for a free place in the CIP pool.

1992: Mitsubishi Laptop, CPU 80386SL/25 MHz, 2 MB RAM, 20 MB HDD, IBM DOS J5.02/V
Highlights: TeXing at home after years of doing that on a dumb terminal. A truly superior feeling!

1995: Custom-made, Pentium I 90, 16 MB RAM, 512 MB HDD, Windows 95/Redhat 2.0
Highlights: Comanche, Doom, Heretic, Hexen, Descent, Duke Nukem 3D, Command & Conquer, and a PC Unix not unlike the Solaris I'd enjoyed on my SPARCstation 10 at Mitsubishi a couple of years ago. Coupled with the 33.6 K Modem with snafu as provider, and the 17" Viewsonic monitor, this was about the ultimate PC anybody could have bought at that time. It also costed a mind-boggling 8000 DM ...

1998: Dell, Pentium II 266 + NVidia Riva 128/Voodoo II 8MB, 384 MB RAM, 8 GB HD, Windows 98/Mandrake Leeloo
Highlights: Quake, Unreal, KDE 1.0, and T-DSL with 768/128 kbit up/down from July 1999. Together with the implementation of the PPPoE protocol by Roaring Pinguin, I started to use the Dell as a router for my wife's gaming rig a year later:

2000: Custom-made, Athlon 750 + NVidia Geforce 1 DDR, 512 MB RAM, 20 HB HDD, Windows 98
Highlights: Unreal Tournament. The whole package: clan membership, clan leadership, clan foundership, fights in a European league.

And so that's how it all started. Just because of the games. ;)


Posted by cobra | Permanent link | File under: thoughts, info, backup, windows, linux, hardware

Sat Apr 7 14:13:48 CEST 2012

Frankfurter Grüne Soße

When I was a kid, my grandma often prepared the famous German green sauce. It was a favored dish of mine, but I realized much later that I liked it just the way she'd done it, and not like it's offered in restaurants. What you get there is commonly nothing more than a mushy potato with a little dip of rather thin, liquidy consistency and mayonnaise-like taste. I was always bitterly disappointed. :( A home-made 'Grüne Soße' would have been the natural alternative, but to obtain the required fresh herbs is usually a difficult task outside the area of Frankfurt.

Luckily, the fruit shop just across the street at which I live offers the original white herb packs directly from Frankfurt for a very reasonable €4.95. So let's try and recreate the original 'Grüne Soße' of my grandma! Since the ingredients for this local dish will be not easily available to people living outside of Germany, I post the following recipe for four portions of the genuine Frankfurter Grüne Soße in German only.

400 g Schmand
300 g Vollmilchjoghurt
200 g Crème fraîche
100 ml Vollmilch
2 EL mittelscharfer Senf
1 EL Weißweinessig
2 TL Salz
1 TL weißer Pfeffer
1 TL Zucker

- Milchprodukte und Gewürze in einer tiefen Schüssel gut verrühren.

200 g frische Kräuter (Borretsch, Kerbel, Kresse, Petersilie, Pimpinelle, Sauerampfer, Schnittlauch)

- Kräuter kurz waschen und mit einer Salatschleuder trocknen. Anschließend holzige und gröbere Bestandteile wegschneiden. Die verbleibenden Anteile mittels eines Wiegemessers oder eines sehr scharfen Kochmessers fein wiegen. Keinesfalls eine Küchenmaschine oder einen Pürierstab benutzen! Die zerkleinerten Kräuter unter die oben angerichtete Grundsoße heben.

8 hartgekochte Eier

- Die hartgekochten Eier pellen, mit einem Eierschneider würfeln und in die Soße einrühren, bis sich die Eigelbwürfel komplett aufgelöst haben.

- Schüssel mit Frischhaltefolie abdecken und über Nacht in den Kühlschrank stellen.

1,5 kg festkochende Frühkartoffeln wie z.B. Charlotte

- Schüssel mit Soße direkt vor dem Kochen der Kartoffeln aus dem Kühlschrank nehmen.
- Kartoffeln säubern und als Pellkartoffeln zubereiten.

Kartoffeln auf flachen Tellern anrichten, Soße darübergeben und sofort servieren. Guten Appetit!


Posted by cobra | Permanent link | File under: cuisine

Sun Mar 25 15:58:39 CEST 2012

Prodigy

Stephen Wolfram is one of the very few persons I'm interested in. Stephen was what you'd call a wunderkind, and consequently got his PhD in theoretical physics from Caltech at the age of 20. But he's not only a singularly gifted scientist, but also a clever business man. He left Caltech, for example, when he realized that his work on a computer algebra system would be owned not by him, but the institute. Four years later, he founded Wolfram Research, released Mathematica a year after, and became a multimillionaire this way.

I've started to use Mathematica in 1993, five years after its initial release. I still remember my feelings when I used it first. I was enchanted, entranced, couldn't believe what I saw on the screen of my toy-like Macintosh II. A software solving differential equations in seconds for which I'd have needed days! That opened up possibilities of which I'd never dared to dream before. From that point on, I couldn't stop to examine physical problems with Mathematica, and my enthusiasm soon led to a first publication. Twenty years later, Mathematica is the only commercial software which I'm continuing to use...and insist of using, in fact.

Last friday on #pdes, haui drew my attention to the latest entry in Stephen Wolfram's blog, entitled "the personal analytics of my life". Stephen is commenting on the statistics shown in this entry at length, but for me the following facts allow an additional conclusion.

  • Stephen writes 70 mails a day on average (and receives about 300). Since he averages only 12000 keystrokes per day, the mails are just about all he writes.
  • He typically attends 10 meetings per day, most of them on the phone. For this reason, he's about 6 hours per day on the phone. He has a 40% chance to be on the phone between 9 and 12 pm.
  • His daily exercise is done partly during his daily dinner break: "[...] with the correct ergonomic arrangement one can type and use a mouse just fine while walking on a treadmill, at least up to—for me—a speed of about 2.5 mph."

For me, these points constitute the essence of a perfectly nightmarish life. Who on earth likes to be on the fucking phone the entire day? And these tricks to be online while being on a treadmill during your dinner break, do you think that's smart? It's pathetic!

Somehow, I can't help but to feel great pity for the rich and famous Dr. Wolfram. I hope he doesn't regret his insatiable appetite for being the guy who runs the show when he's old and sick and his 4 kids are out of the house. I'd recommend to look at Donald Knuth's decision and to learn from it.


Posted by cobra | Permanent link | File under: thoughts

Sat Mar 17 15:50:54 CET 2012

Faster!

I love fast and snappy updates. Besides a speedy package manager, the mirrors from which the updates are downloaded determine how fast the updates arrive at their destination. In Arch, the script 'reflector' is the most convenient way to select up-to-date mirrors with a fast response. Like that:

reflector -c Germany -l 15 -f 6 --sort rate --save /etc/pacman.d/mirrorlist   
pacman -Syyu

Posted by cobra | Permanent link | File under: archlinux

Sat Mar 17 14:52:05 CET 2012

High pressure

It's suddenly spring, but my bicycles' tires are all flat. It's high time to get a pump! But which one?

Well, let's see what I need.

First of all, the pump must be able to deal with Presta, Schrader and Dunlop valves. Second, it should have a secure and tight connection to all of these valves while still allowing me to change between them quickly and conveniently. And third, it should last longer than its predecessor. Ideally, it should still serve me in 20 years as well as today.

My internet research suggested that a 'Lezyne Alloy Floor Drive' should satisfy these requirements. So I got one, and after boosting my city bike's tires to 5 bar with just a few easy strokes, I felt sure that my choice was not all that bad. :)

top view top view top view

Posted by cobra | Permanent link | File under: hardware

Fri Mar 9 20:38:09 CET 2012

Symbols and more

Some LaTeX related stuff.

  • Instead of searching for symbols in the trusted Comprehensive LaTeX Symbol List, you may now simply draw them. It's surprisingly accurate, and what's more: it's useful and fun.
  • If you don't know LaTeX that well, but want to write an equation: draw it.
  • Once you have the code, get a short URL to show it to your colleagues.
  • Mentioning colleagues: wouldn't it be nice to work on a manuscript together, without the need of version control systems and the likes? Look here or here.
  • Finally, an overview which amazes beginners and delights LaTeX veterans like me since it is not only comprehensive but also beautifully done. Chapeau, Lian Tze!
By the way: when flipping through the slides of the overview, I imagined a grizzled veteran with thick glasses and a shaggy beard as the author. Now look at that!

Posted by cobra | Permanent link | File under: presentations, latex

Fri Mar 9 20:25:58 CET 2012

On top

Delete ~/.htoprc and enjoy a more compact display than previously. An absolute must if you have more than six cores.

desktop screenie

Posted by cobra | Permanent link | File under: debian, linux, hardware