Botanical Garden, Hamburg, Germany
Canon EF100mm/f2.8 Macro USM, no flash
(c) Markus Ehrenfried

 

UNIX stuff

  • Those useful options of the UNIX grep command I always keep forgetting
  • Finding e.g. all txt files under the current directory:
    find . -name "*.txt" -ls
  • Printing text files with long lines (like tables) can be done nicely with a2ps:
    a2ps -r --columns=1 -o [outputfile.ps] -l [number of characters per line] inputfile.txt
    where -r switches to landscape, -o specifies the output file and -l specifies how many characters per line to print, e.g.
    -l 140.
  • Printing a file in simplex mode while the printer's default is duplex is possible with the option
    lpr -Zsimplex -Pprintername filename
  • Joining several postscript files into one is really simple:
    cat first.ps second.ps third.ps ... > tmp.ps
    ps2ps tmp.ps allinonefile.ps
  • Sometimes I try to be a nice person, safe paper, be kind to the environment, :) by printing papers in landscape with two pages (reduced to A5 size) next to each other on one A4 page:
    psnup -2 originalfile.ps newfile.ps
  • qsub -I -q XXL opens an interactive session in the XXL queue on the PC farm.
  • After installing a Fritz!Box router, my ssh windows kept dying due to timeout. The solution is to motivate ssh to regularly send data packages over the connection even if you are not using the window (Thanks again, Chris!!). Therefore one has to edit the local ./ssh/config file as follows:

    Host worf
        Hostname worf.desy.de
        ForwardX11 yes
        User ehrenfr
        ServerAliveInterval 10
        ServerAliveCountMax 10


    ssh will now send every 10 seconds a data package over the conection which prevents it from timeout.

 

Emacs and XEmacs stuff:

 

C related stuff

 

LaTeX stuff

  • LaTeX converts chapter and section headings into upper case for the headlines printed at the top of each page. It doesn't respect formulas, e.g. converts something like "A=b" into "A=B". It is possible to force LaTeX to use lower case with the command \protect$A = \lowercase{b}$.
  • It is easy to edit the bounding box of an .eps file (if there is e.g. too much white space around a plot or one needs to cut (mask) something away. Somewhere in the first lines of the .eps file the coordinates of the bounding box are defined: %%BoundingBox: x0 y0 x1 y1 where (x0, y0) are the coordinates of the lower left corner and (x1, y1) are the coordinates of the upper right corner. The unit is dots-per-inch (dpi). If e.g. y0=0 one can cut away one inch from the bottom of the picture by changing it to y0=72.

 

PAW stuff

  • PAW FAQs @ CERN
  • Sometimes the content of the HIGZ graphics window in PAW gets lost if the window is overlapped by another window. This can be fixed by adding
    Option "backingstore"
    in the section "Screen" in
    /etc/X11/XF86Config-4
  • one reason to REALLY hate PAW: the symbols < and > are produced by "L#! (or \76) and "G#! (or \74)-- ... who the fuck get's ideas like that??
  • one more reason to hate PAW: subscript like xBj is produced with the command x?Bj! while superscript is done as in LaTeX with e.g. Q^2 for Q2.
  • locate -i is a very useful command e.g. to count entries in single histogram bins or to integrate over a certain range of bins.
  • gcut allows to define a graphical cut in a one or two dimensional plot which is also useful sometimes.

 

Mac OS X stuff

 

 

zero means false

all non-zero values are regarded as true
 

Every time I try it again:

if( a <> b ) {...}
--> parse error!

"<>" is not C syntax! correct is:

if ( a != b ) {...}

or

if( !(a==b) ) {...}

 

> killall -TERM kdeinit ksmserver
 

> rm .Xauthority
> klog.krb

then log out, shut down X11 server, restart again and try to login again. For some reason sometimes really

> ssh -X user@host

is needed...
 

The shortcut Apple + i in Safari will open a new e-mail containing the currently viewed webpage.