Software & Manuals
LaTeX is a very powerful tool for typesetting mathematical expressions. However, when looking at a typical document one often finds that mathematical equations that are too long to fit on one line or that consist of several equations in one block are often only poorly typeset in spite of the power of LaTeX.
This short introduction tries to show how a nice typesetting is done easily and efficiently. It includes an introduction to the less known, but very powerful tool "IEEEeqnarray".
English is — in spite of what some people might say — a very difficult language. In particular it is very difficult to find rules that work. Nevertheless, I have tried to attack (or is it "try attacking"!?!) one of my biggest English difficulties: when to use the infinitive and when the ing-form... Perhaps this might be useful for you, too! In any case, I would be happy to receive feedback!
The number of passwords that I should be able to remember nowadays is far over 100. So unless I choose them all to be all the same or use some other very insecure tricks, the only way to survive is to keep a file with them written down. However, among all tricks that help with remembering passwords, this is about the most insecure and silly thing to do...!
My solution is to keep a password file, but to have it securely encrypted using one of the best encryption standard there is: the open-source and free program GPG. I use a separate and unpublished private/public key-pair only for that particular file. For more details about GPG, see my How-To of GPG.
So the only problem is how to access and edit the secure password file. I do not want to store the passwords unencrypted on my harddrive at any time, not even temporarily for editing! For that reason I have written a small script mygpg that accesses the file, decrypts it, invokes an emacs, and passes the decrypted information into a buffer of the emacs. At the end the emacs will take care of the encryption and will write the encrypted file back to disk. The unencrypted information is never stored anywhere but solely kept in the memory of the computer during the accessing/editing time.
Usage: For normal use simply call "mygpg". The optional argument "-h" will print a short help message and exit. For calling the emacs inside the terminal (if there is no X11 environemnt) use the option "-t". For only reading the file without the possibility to edit, the file can also be displayed using 'less'. To do so, use the option "-l". To create an empty password file, use the option "-c".
This very brief introduction to GPG is already some years old, but it should still be up-to-date (more or less...). I hope it is useful...
OS X 10.6 has a bug in the Apple Address Book that prevents the program to correctly connect to CardDAV servers (404 error or similar). There is a simple fix to this problem.
Typesetting Chinese in LaTeX used to be quite a headache. I remember spending hours and hours in trying to set my system up. In the meantime, things have simplified considerably (or I have simply learned how to do it properly...). Here are some very brief instructions on how to proceed.
I distinguish two different situations: the case where I want to compose a large document containing a lot of Chinese characters and the case where I only need to incorporate a few Chinese characters (like, e.g., my Chinese name) in a otherwise Western document.
Most available address-management tools have either too many or too few features for me. I have therefore started writing a small (partially LaTeX-based) Perl-script that takes care of my addresses: I keep an ASCII-file with the necessary information (name, address, telephone, email, birthday, remarks). The script then generates (via LaTeX) a printable version that I can carry with me. The advantages are obvious:
System Requirements: Any Unix-flavored system or Mac OS X with working Perl and LaTeX. For usage as (birthday or general) reminder system and for electronic search of entries (including the web-based version) no LaTeX is needed.
If you want to be informed about updates, please send me an email, I will put you on my mailing list (don't worry, you won't get many emails if you do so!).
Link to my personal address book (password needed)
System Requirements: Apple computer running Mac OS X 10.4 or 10.5 (both tested) or 10.3 (not tested, but I'm pretty sure it works as well).
Problem: You are using your laptop (or another computer) away from home and would like to access your files at home. Apple offers the convenient AFP connection ("Connect to Server..." or command-K). However, if you don't have the Mac OS X Server version there is no way to make this connection secure, i.e., everything that is transmitted over the Internet is clear-text, including your login and password! Furthermore, you have to open your computer at home to the world which includes a guest-access. While the guest-access is restricted, of course, you still might feel uncomfortable with it, particularly if you are sure that you actually don't need it.
Solution: Open a SSH connection to your home computer (the remote computer) and then pipe your standard AFP connection through this SSH tunnel. Unfortunately, the commands to do so are very UNIX-like and cryptic. I have therefore written a small shell-script that will do everything for you. You only need to follow the following steps:
For Advanced Users: For more options of afptunnel type "afptunnel -h".
System Requirements: Any UNIX-like system like Mac OS X.
Problem: You are using your laptop abroad and would like to send some email. Usually you then get into problems because you either
Solution: Open a SSH connection to your home computer (the remote computer) and then relay your mails via your home computer to your usual SMTP server at home. This way your mails look like being sent from home, your mails are securely sent through the unknown net-access you are using, and your mails are even compressed in case your net-access is slow! You only need to follow the following steps:
For Advanced Users: For more options of mailtunnel type "mailtunnel -h".
Installation: To install any of these scripts, download the script, decompress it, and put it anywhere you like, e.g., into ~/bin/. Then make sure that the executable flags are set (chmod a+x script-name).
Usage: Simply type the name of the script into a terminal.
The script mp3move (version 4.1, April 2009) is a script that I wrote when I needed to arrange the files on a MP3-CD: the script renames all files in the current diretory as follows: firstly a given number of letters is removed from the filename starting at a given position (e.g., removing an old counting), then a new consecutive numbering is added in place of the removed letters. The numbering starts at a given point and has a fixed number of positions.
The script multicopy (version 2.2, September 2010) copies all files starting with a certain string to a new file with a new name, preserving the original ending of the filename.
The script multimove (version 2.2, September 2010) renames all files starting with a certain string, preserving the original ending of the filename.
The script pdfa4toletter (version 1.0, April 2013) converts a pdf-file in a4 format into letter format by cropping, not scaling. For more info, type "pdfa4toletter" without arguments.
The script pdfinsert (version 1.0, January 2013) inserts a pdf-file into another one at a specified page. For more info, type "pdfinsert" without arguments.
The script pdflettertoa4 (version 1.0, April 2013) converts a pdf-file in letter format into a4 format by cropping, not scaling. For more info, type "pdflettertoa4" without arguments.
The script pdfnupsmart (version 1.1, May 2010) rearranges the pages of a pdf-file: two pages are put onto one page in such a way that the odd pages are on the right-hand side like in an open book. Moreover, to avoid problems with some printers, the file is then rotated to normal portrait style.
The script pdfselect (version 1.0, May 2010) lets you pick an arbitrary range of pages from a pdf-file, similar to psselect. For more info, type "pdfselect" without arguments.
The script prefixadd (version 1.0, October 2010) adds a prefix to all files ending with a particular string.
The script psnupsmart (version 1.1, May 2010) rearranges the pages of a postscript-file: two pages are put onto one page in such a way that the odd page numbers are on the right hand side like in an open book.
When exporting photos from iPhoto, the numbering system is not UNIX-like: they are called photo-1.jpg, photo-2.jpg, ..., photo-10.jpg, etc. This way the numbering is not in alphabetical order which can cause problems with other programs. The script stuffzeros (version 3.2, June 2009) automatically corrects this. It will add zeros in front of the numbers so that the files afterwards are named photo-01.jpg, photo-02.jpg, ..., photo-10.jpg, etc.
The script suffixadd (version 2.1, October 2008) adds a suffix to all files starting with a particular string.
I sometimes need to have a simple stopwatch or timer (version 3.3, June 2012) handy, so I wrote this small Perl-script. Maybe someone else might find it useful, too...
The script watchdog (version 1.1, October 2008) regularly checks a file and informs by email if the file has been modified. This is done either once, or continuously until the file is renamed or deleted.
-||- _|_ _|_ / __|__ Stefan M. Moser
Last modified: Thu Dec 19 09:50:07 UTC+8 2013