Unlock mozilla thunderbird/firefox

Your favorite browser/mail client is locked? The same stupid window keeps opening, saying 'profile already in use'? Unlock your program in three steps (replace thunderbird by firefox if necessary):

  1. read your mozilla profile configuration file :
  2. vi $home/.mozilla-thunderbird/profiles.ini
    
  3. look what is your default profile path :
  4. [General]
    StartWithLastProfile=0
    
    [Profile0]
    Name=default
    IsRelative=1
    Path=1marg9sa.default
    Default=1
    
  5. delete the corresponding lock file :
  6. rm $home/.mozilla-thunderbird/1marg9sa.default/lock
    

Text editor

The vim text editor is fast and highly configurable. C, html, php and perl code can be conveniently written with perfect syntax highlighting extremely quickly.

html-php clean-up/verifying tool

This tool was used to clean-up and indent the 'error-free' html code of these web-pages.

example :

Video player/encoder

mplayer

Find a file containing a given string

find <folder> -name "*.<suffix>" | xargs grep <string> 

Edit file in place with sed

sed 's/pattern1/pattern2/g' <file>

Example : give me all the .eps files included in the .tex files in this directory

egrep "\.eps" *.tex | sed -e "s/.*{\(\/.*\.eps\)}.*/\1/g"

Crop eps files with white borders (matlab)

Thanks ImageMagick !! It has an embeded autocrop function!

mogrify -density 150 +antialiasing -crop 0x0 <eps_filename>

Convert eps files to high quality png files

Thanks ImageMagick, again. With -density argument, the dpi resolution can be adjusted at will.

convert -density 150 <eps_filename> <png_filename>

Load another keyboard map for console

Example : under debian, give me the swiss french qwertz keymap !.

loadkeys /usr/share/keymaps/i386/qwertz/fr_CH.kmap.gz
design: florent monay, patterns by squidfingers.com