Read this post about how to reload your pdf document. This is particularly useful when you are creating a new document with LaTeX. Sweet, I was waiting for that functionality.
Tags:english tech |
Filed on December 21st, 2009 | No Comments »
Ein jeder (Hobby-)Koch benötigt ein gutes Kochmesser. Im Weblog Lifehacker wurde vor kurzem ein Messer empfohlen welches eine sehr gute Qualität besitzt, aber statt 100-200$, wie vergleichbare Produkte, nur rund 30$ kostet. Das vom schweizerischen Hersteller Victorinox hergestellte Messer scheint jedoch in dieser Form nur in Amerika erhältlich. Zumindest fand ich es im europäischen Victorinox Katalog nicht wieder. Bei Amazon.com ist es immerhin das meistverkaufteste Messer.
Auf Nachfrage bei Victorinox erhielt ich aber die Information das es in Europa ebenfalls vertrieben wird – nur mit leicht anderem Bedruck. Die Artikelnummer ist 5.2063.20. Ich habe es bereits gekauft und es macht einen guten Eindruck.
Tags:cooking german |
Filed on November 23rd, 2009 | No Comments »
Emacs usually takes quite some time to fully start up. However, as described in the great blog Emacs-Fu, Emacs 23 can now be started in the background as a daemon. This allows to fire up a new Emacs instance really fast. Thanks djcb!
Tags:emacs english tech |
Filed on November 20th, 2009 | No Comments »
Say you want to print the lines 3 and 7, and all lines from 11 to 15 of a text-file. The following SED one-liner will do for you
sed -n -e '3p' -e '5p' -e '11,15p' textfile.txt
Tags:commandline english linux tech |
Filed on October 31st, 2009 | 1 Comment »
For the first time I could personally sense the effects of the economic crisis. The manufacturer of my Bluetooth device ANYCOM USB-200, the Germany-based ITM Technology AG is insolvent. Immediate effect for customers like me: No more driver updates and their general unavailability on the homepage.
Here is the good news for everybody who wants to use an ANYCOM Bluetooth USB adapter (200, 250, 500) on Windows 7. The Vista driver runs just fine under Windows 7. And I got the driver ( “anycom-bluetooth-usb200-250-500-vista-v6-1-0-4700.exe”). If anybody needs it, feel free to send me an email (see About). It may be worth noting that Windows 7 complains about not being able to correctly install Bluetooth devices like a headset (Plantronics Voyager 510 for me), while in fact you you only need the correct driver for the adapter.
Update: After brisk demand I decided to allow you to download the driver directly from this website. Of course, no warranty whatsoever provided.
Tags:english tech windows |
Filed on October 6th, 2009 | 7 Comments »
Several people have recently asked me whether or not it is possible to use tuples in their shell script. One example is running a program with a varying set of parameters. Since they often did not find a good solution, they began to formulate their problem in a higher-level scripting language like Ruby. Surprisingly, you can accomplish the same task easily with simple shell scripting (supported by bash, zsh,..). Consider the following (semi-stupid) example
#!/bin/bash
paramset="foo.txt 1 --with-graphics
bar.txt 8 --no-graphics
flock.txt 4 --with-graphics"
echo "$du" | while read file p1 p2 ; do
./myProgram $file -t $p1 --verbose $p2
done
We here run the program myProgram three times (for each line in the multi-line string). Every line contains three white-space separated values (words), to which we assign the variable names file, p1, p2 in the loop header. Note that the last variable (in this case p2) always contains all remaining words of a given line if there are more words then variables.
The set of parameters can also be stored in a file. In that case, replace the loop header with cat params.txt | while read file p1 p2 ; do. If the script is not working properly, examine the Input-Field-Separator (IFS) variable, which should be set to IFS=" ".
Tags:commandline english linux scripting tech |
Filed on October 2nd, 2009 | 1 Comment »
Here are some impressions from my recent trip to the Scotland. It really is a lovely place to travel. The route included places like Stirling, Fort Williams, Isle of Skye, Glenfinnan and more.
Read more »
Tags:photos |
Filed on September 15th, 2009 | No Comments »
Writing a paper often comes along with a problem known as information fragmentation: figures, tables and the respective data sources related to the paper certainly are somewhere on your hard disk – but where? How did I name the file with the data-points again? And, the heck, which commands did I use to create that fancy plot? But chill, there is a way to avoid the joyless seeking and re-finding. At least if you draft your papers in org-mode, as I described in a recent post.
Read more »
Tags:emacs english R science |
Filed on July 8th, 2009 | No Comments »
I like to have the following snippet in my .zshrc (or .bashrc) for convenience
alias lsd="ls -l|awk '/^d/ {print \$9}'"
It displays all subdirectories underneath the current directory. The goodness in this variant is that it gives you the pure names and that you can use it in loops without hassle :
for d in `lsd`; do
mv $d/resultfile.dat $d_result.dat;
rmdir $d;
done
Tags:commandline english linux |
Filed on June 7th, 2009 | No Comments »
This post describes a very, very elementary debugging skill. Yet, I could not find any concise tutorial about it on the web. So, here we go!
Assume you’re developing a small software under Linux, maybe using C or C++ and the GCC compiler. Testing your program, you find that it crashes with an error (segfault, assertion, …). How do find the cause for this crash rapidly? How can you back-trace the error?
First, compile your program again adding the option “-g” (or “-gstabs“). The compiler (e.g. g++) will now include information necessary for debugging into your binary. Start Emacs and invoke “M-x gdb“. As parameter, enter the full path of your executable. You end up with something like “gdb --annotate=3 ~/myProject/myProgram“. In the newly opened buffer, set the commandline parameters as for example in “start --verbose-mode inputfile.dat“. Simply append the program options you normally use after “start“.
Run the command “c” (=continue). Your program will start – and crash. Now, invoke “M-x gdb-many-windows“. You will see the steps leading to the function that caused the crash in the window “stack frames”. By clicking on each of the steps, Emacs will directly navigate to the respective source code block, enabling you to trace the cause of the error. Find a more extensive tutorial here.
Tags:emacs english programming |
Filed on May 26th, 2009 | No Comments »