Showing posts with label bookmark. Show all posts
Showing posts with label bookmark. Show all posts

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

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:
  • OpenOffice.org / 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.
      Untested.
    • excel2latex
      macro for Excel. Export to latex code.
      Untested.

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:
\pdfminorversion=5
This way pdfTeX builds the document with pdf Version 1.5 instead of 1.4.
Before:
> file document.pdf
document.pdf: PDF document, version 1.4
After:
> 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

Monday, September 19, 2011

Tuesday, September 6, 2011

Quick encryption with gpg

Today another kind of bookmark-style post;
Scenario:
You want to protect some file with a password to
  • store it on your local computer
  • send it to someone else.
You need the same password on both sides (=encryption and decryption).
(If sent to someone else, make sure to transfer the password on another way than the file.. )
  • encrypt:
    • % gpg --symetric foo.txt
      results in a file foo.txt.gpg which contains binary data
    • % gpg --symetric --armor foo.txt
      gives foo.txt.asc which contains ascii characters, which makes sense (for small files) when you want to paste it directly into an email
  • decrypt:
    • % gpg --output foo.txt --decode foo.txt.gpg
    • % gpg --output foo.txt --decode foo.txt.asc

source: http://advosys.ca/viewpoints/2006/07/pgp-symmetric-encryption/

Wednesday, August 3, 2011

Repack a .deb-archive

Today just a bookmark.
Needed to change some files inside a .deb archive; found a short tutorial here:
Repack a .deb-archive with dpkg-deb

For backup reasons a c&p from the blog above:

Thanks maff.