Archive for June, 2008

NoScript

NoScript opens its own page on every update, which I find very annoying. You can turn that off by the noscript.firstRunRedirection config option (go to about:config).

No Comments

Join/Merge PDF files together

Just found this wonderful command here for ghostscript to produce one pdf out of many:

gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=finished.pdf file1.pdf file2.pdf

3 Comments

Deskbar Extension Converter with Calculator functionality

Ever wanted to get answers to questions like the following?

3 kilometers in meters
6000 gallons in litres
1E+06 au in pc
7*4 EUR in dollars
0x5621*sin(3)+16 euro in dollar
$ 0.50*100/3 in euro
-L- 0.50 in euro
15 kg/m^3 in g/cm^3
3E+09*sin(3)+pow(3,10) kg/m^3 in g/cm^3
3 1000 in 1

And that quickly, from your desktop?

There existed a Converter and a Calculator extension, I made them work together.

Converter-with-Calculator

Download: converterplus-1.9.tar (bz2, 9 KB) converterplus-1.8.tar (bz2, 6 KB)
Howto install:
You have to copy both files from the archive to ~/.gnome2/deskbar-applet/modules-2.20-compatible/, then activate them in the deskbar-applet Preferences.

Old versions of Converter and Calculator will not work together!
You can easily check if you got the right versions: They have my name as author in them and contain the line “This version of calculator can be used with converter” and vice versa.

You need to have the program units installed to benefit from Calculator. It is in your distribution’s repository under the name ‘units’.

Bugs: Please send bug reports by email or leave a comment here.

Technical details:
(users don’t need to read this)

The question was to either copy over the code from Calculator to Converter or to reuse the Module. Code duplication (DRY) was a definite argument against that. If Calculators code gets updated, Converter benefits too. Also, you can enable each functionality seperately.

Problem was to access the other module when loaded in deskbar, I made a hack for loading a file in the same directory, no matter of the context (see source).

7 Comments