Niels Meyer

This is a collection of tipps and tricks which ease my every-day life and maybe are interesting for you as well. More information about me and my work can be found on my homepage

Printing ASCII files in landscape

My most favorite way of printing ASCII files is a2ps - unfortunately, the print-out is rather ugly with the standard options when the lines contain more than 80 characters. These commands create a print-out in landscape mode:

a2ps -f08 -r --columns=1 <file>

Unlinking git repository from its origin

Every git repository being create as clone of an existing repository has a remote link 'origin', on first sight not distinguished from any other remotes. However, getting rid of it is not as easy as 'git remote rm origin'. These few manual steps worked for me, though:

$> git remote rm origin   # this will give an error message, just ignore
$> edit .git/config and delete all lines of type 'remote = origin'
$> remove the directory .git/refs/remotes/origin

(Sebastian: this is a bug and fixed in git 1.5.6. See: -- "Make "git-remote rm" delete refs acccording to fetch specs" We have quite some git versions available. Which one do we want?

$ flcini
git ........... - git version
git153 ........ - git version 1.5.3
git1541 ....... - git version
git1601 ....... - git version
git1602 ....... + git version


Creating PDF documents from the CALICE eLog

The Calice eLog (inside outside DESY) has the functionality to create PDF documents from the current display, usually the log of one day or the result of a search query. I came across the problem of desiring a print-out of several weeks of data taking, so here's what I did:

  1. write a small script that auto-downloads the day-to-day logs from within the period of interest

  2. delete all obviously empty files (below 1kB, there is no entry for this day)
  3. daisy-chain all pdf's via pdftk (available on SL4 machines at DESY)

pdftk *.pdf cat output elog.pdf

Changing the 'from' field of eMails in PINE

See this page.

Email: <niels.meyer AT SPAMFREE desy DOT de>


NielsMeyer (last edited 2009-06-16 18:32:16 by localhost)