Saturday, April 21, 2012

Force apt-get to reinstall config files

You can reinstall config files from a package with the following command:
apt-get -o DPkg::options::=--force-confmiss --reinstall install <package>

Thanks to skanx, the original post can be found at Force apt-get to reinstall config files | 6log

Sunday, December 25, 2011

espresso jelly

This is a howto/documentation for Espresso jelly.

One day a couple of friends and me got the idea of espresso jelly. We all like to drink espresso (or moka or whatever the correct term for this kind of "coffee" is (see the coffee pot in the images below)) and found the idea of a brown jelly with intense coffee taste smeared on the morning bread rolls quite amusing.

  • Gelling sugar with a fruit-sugar relation of 2:1 (in this case espresso-sugar relation).
    Other terms for gelling sugar:
    • Sugar with pectin
    • Jam sugar (British)
    • Jelly sugar (US)
    • Aspic sugar
    (Not to confuse with Preserving sugar, which does not contain additional pectin)
    See Wikipedia - gelling sugar
  • Espresso
  • Sugar (optional)

Gelling sugar Espresso Sugar Description
Variant 1 250 g 375 ml - variant tends to get a bit more liquid / syrup-like. Qualified as ice cream topping ;-)
Variant 2 250 g 300 ml 1 Tablespoon Firm jelly. You may want to leave the additional sugar out. Tries to resist the bread-roll-distribution.
  • Variant 1 corresponds to the instructions of the gelling sugar.
  • As the comment in variant 2 states, to get a firm jelly - use less espresso and maybe add an additional spoon of sugar.

The following pictures show variant 2.

This is the used gelling sugar.

300ml Espresso (~3 Times of cooking with the used pot ;-))
Variant 2 says 250g of gelling sugar with one Tablespoon of (normal) sugar.

Pouring the espresso into the mixed sugars.

Heating it up. Following the instructions on the gelling sugar: Boil for approximately 4 minutes and test the gelling ability (take a teaspoon of it, put it on a dish and see if it gets firm; if it's still liquid, keep cooking). Do not interrupt the boiling. Boil for max. 8 minutes.

Quickly pouring the hot jelly into the prepared glassed and closing them in an instant.

Waiting a day.. aand Yummie!

Change font size and font type of text-only mails in gmail webinterface

Writing emails in gmail webinterface using the 'plain text' option results in wrong aligned text because gmail uses a non-fixed-width font.
Additionally some forwarded mails are displayed very small.

Steps to reproduce the 'very small font' effect:
  • Write mail with 'plain text' option in gmail.
  • Send mail.
  • Receive mail with stand-alone mailclient, e.g. Thunderbid/icedove,
    • configure client to compose mails in html/rich text mode
      ( Edit|Account settings|Composition&Addressing|Compose messages in HTML format (Icedove 3.1.16) )
  • Forward mail to gmail account
  • View mail in gmail webinterface.

Found a userscript which sets the font in gmail to the browsers default monospace font. No further configuration needed.
The script can be found on - Gmail Fixed Font or directly downloaded from GitHub - jparise / gmail-fixed-font.
  • Chromium pops up an install notification. Userscripts are directly supported. Browser restart seems to be needed after install to apply changes to the gmail webinterface display style.
  • Firefox needs an extension to be able to handle userscripts. Greasemonkey can do that. Get it here (installation of the greasemonkey extension needs a browser restart). Now greasemonkey pops up a notification when clicking on a userscript and asks for installation. Reload gmail tab to apply display changes made by the script.

See the following screenshots for the difference. Take a look at the mail text for additional information.

Default gmail display settings:
The composed mail. The same mail forwarded with an external email client set to html mail-formatting back to gmail.

This time with the userscript 'Gmail Fixed Font' enabled:
The composed mail like above. The forwarded mail like above.

(Btw: It will be listed in the extension tab in chromium.)
Tested with chromium 15.0.874.121 (Developer Build 109964 Linux) Debian wheezy/sid and
Firefox 8.0 with Greasemonkey 0.9.13.
'Gmail Fixed Font' version 1.23 in both cases.

edit: (25.12.11)
- added install information for chromium and firefox.

Thursday, December 15, 2011

LaTeX tables - from spreadsheets to tex

Writing tables in LaTeX is a pain in the ass.
Create a table as draft, find an error, move a column etc. AAarrrrgh.

A nice way to create the basic table and fill it with data is to use a spreadsheet application like MS Excel.

I found some promising tools to convert from spreadsheet applications to latex:
  • / LibreOffice
    • calc2latex
      A macro. Generates tex code from selected table area.
      Tested. Works with LibreOffice 3.4.4 (debian package '1:3.4.4-2').
  • MS Excel
    • exceltex
      Directly include .xls files in latex documents.
    • excel2latex
      macro for Excel. Export to latex code.

Monday, December 5, 2011

pdfTeX - get rid of pdf inclusion version warnings

When you include pdf-images in your LaTeX document and get this kind of warnings:
pdfTeX warning: pdflatex (file ./fig/fig_FooBar.pdf): PDF inclusion: found PDF version <1.5>, but at most version <1.4> allowed [...]
Then give pdfTeX this command:
This way pdfTeX builds the document with pdf Version 1.5 instead of 1.4.
> file document.pdf
document.pdf: PDF document, version 1.4
> file document.pdf
document.pdf: PDF document, version 1.5
and no more warnings.

Thanks to Mads Darø, found the solution in his blog:
Kedelig Data: Controlling PDF Minor Version in LaTeX

Just for reference:
> This is pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009/Debian)
Debian package version: texlive 2009-14