jump to navigation

Tips & Tricks: merge postscripts or pdf files 2008-06-28

Posted by claudio in Uncategorized.
Tags: , , , ,
add a comment

It’s nice that firefox 3 can directly create pdfs (print, select print to file). However, while doing research and creating pdfs of articles, some were split in different pages (or needed additional information, like citation information). Here’s how to merge those pdfs from the command line:

$ gs -q -sPAPERSIZE=a4 -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=result.pdf input1.pdf input2.pdf input3.pdf

Change the PAPERSIZE value to “letter” if you live where the use that format. “result.pdf” is the result of merging “input1.pdf”, “input1.pdf” and “input1.pdf”. Change the values to fit your files.

VirtualBox: Install Windows XP using pbx boot 2008-06-24

Posted by claudio in Uncategorized.
Tags: , , , , , ,
16 comments

VirtualBox is a great product for a developer (or even a regular user) to run several OSes simultaneously. I run Linux on my laptop, but I need a Windows partition with certain software and updates to connect to the work network. A virtual machine is a fine solution. Specially when running in seamless mode (only the program is open in your Linux desktop and not the complete Windows desktop).

Installing Windows from cd on a VirtualBox instance is really easy. However, I need a *specific* windows installation that can only be installed from a Windows PXE server at work. Sadly, the virtualbox open source edition delivered with Ubuntu 8.10 is unable to do this. This is what I did: (more…)

How to change the default shell editor in Ubuntu 2008-06-18

Posted by claudio in Uncategorized.
Tags: , , , ,
1 comment so far

Using nano as the default shell editor is probably a great choice for a Gnu/Linux distribution (also) aimed for Unix newbies. If you know your way on the command line however, you’ll scream from frustration for every “i”, “:wq!” or “ZZ” you type and you see the characters in the text you are editing. Specially frustrating in cron. If you don’t know what “i”, “:wq!” or “ZZ” do, don’t worry, nano is working fine for you. (more…)

Create html from a chm file 2008-05-04

Posted by claudio in Uncategorized.
Tags: ,
add a comment

Microsoft crew 1978

Sometimes documentation can be found in the horrible chm format (Microsoft compiled html). There are UNIX viewers to see these kind of files (gnochm, xchm, etc) but it is nicer to have it in a more flexible format (print, search, edit): html. I use “extract_chmLib” for this.

Extract the file documentation.chm to directory documention:

$ extract_chmLib documentation.chm documentation

Use external functions/modules in korn shell (ksh) 2007-08-07

Posted by claudio in Uncategorized.
Tags: , , , , , ,
1 comment so far

The korn shell is a great shell to write shell scripts. Some functionalities are really nice. By example, you can write your functions or modules in a separate file and use it within your program. The secret lies in the FPATH environment variable. (more…)