Thursday, December 18, 2008

Creating DJVU files

I wanted to create a DJVU file from some photocopies (TIFF)

I found some nice tutorials at

http://www.howtoforge.com/creating_djvu_documents_on_linux
http://en.wikisource.org/wiki/Wikisource:How_to_create_a_DJVU_file
http://en.wikisource.org/wiki/Wikisource:How_to_create_a_DJVU_file

Two incredible tools:
http://gscan2pdf.sourceforge.net/
http://unpaper.berlios.de/

My final code was
To rotate and crop all the tiff files:
$ mogrify -rotate 90 *.tiff
$
mogrify -crop 3600x2448+600x0 *.tiff

And then the following script:

#!/bin/bash

shopt -s extglob

MASK="*.tiff"

for i in $MASK; do
if [ ! -e $i.djvu ]; then
echo "$i"
tifftopnm $i > $i.ppm
# unpaper --layout double --output-pages 1 $i.ppm x_$i.ppm
cpaldjvu -verbose -bgwhite -colors 2 $i.ppm $i.djvu
# rm x.ppm $i.ppm
fi
done

# compile a bundled DjVu document
djvm -c book.djvu $MASK.djvu

To make the OCR, use the service in the page
http://any2djvu.djvuzone.org/

Saturday, October 4, 2008

FATsort: listen your MP3 in order!!!

FATsort is useful if you want to listen in order your MP3 files on your MP3 hardware player.

FATSort is a C utility that sorts FAT16 and FAT32 partitions. FATSort reads the boot sector and sorts the directory structure recursively.

$ sudo umount /dev/sda1
$ fatsort /dev/sda1

Monday, September 15, 2008

How to Create a Flash Demo (for showing software)

Use one of the following:
http://www.debugmode.com/wink/
http://www.prasannatech.net/2008/08/how-to-create-flash-demo.html
http://www.linux.com/articles/113764
http://www.unixuser.org/~euske/vnc2swf/index.html
http://apusay.blogspot.com/2008/01/30-screencasting-software-with-download.html
http://wc4.worldcrossing.com/webx/.1dea8f49

Sunday, September 14, 2008

To avoid the crash of the X11 in MATLAB

Add the following lines

% To avoid the crash of the X11
% See http://www.mathworks.com/matlabcentral/newsreader/view_thread/158572
disp('Loading opengl software to avoid X11 crash')
opengl software

At the end of:
/usr/local/matlab/R2008a/toolbox/local/matlabrc.m

Saturday, September 6, 2008

Linux - howto convert iso-8859-1 charset html files into utf-8 charset files

$ iconv --from-code=ISO-8859-1 --to-code=UTF-8 ./oldfile.htm > ./newfile.html

ONLY convert file that really are in old charset to new charset

If you convert a file that was already in the new charset format or that you converted manually before or inserted text components in new charset inbetween old text components - then you may get something worse ... neither UTF-8 and nor ISO-8859-1 ...

hence make sure your OLD file IS in OLD charset before running the tool !!

Friday, September 5, 2008

Linux distributions for Parallel Computing

In http://en.wikipedia.org/wiki/Beowulf_(computing)

you can find a list of live linux distributions for parallel computing

Tuesday, June 24, 2008

Configurando el mouse en mi casa

Configurando el mouse en mi casa

en consola
# gpm -m /dev/ttyS0 -t mman


Y en /etc/X11/xorg.conf

Section "InputDevice"
Identifier "Configured Mouse"
Driver "mouse"
Option "CorePointer"
Option "Device" "/dev/ttyS0"
Option "Protocol" "MouseMan"
Option "Emulate3Buttons" "off"
EndSection

Saturday, March 29, 2008

Mediubuntu

Since the development of Automatix will not continue, use the repository

http://www.medibuntu.org/

to install the codecs in linux.

Tuesday, March 4, 2008

This is not a Linux tip

in Window

sysInternals.

This is a seperate Microsoft facility.

Here is the linkt ot the Process Explorer -> http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx

is a good program to see what is going on in the machine


Now
http://www.mojopac.com/
is a good virtual machine for windows

Friday, February 22, 2008

Resolution in the KDM

The KDM greeter was showing a bad resolution I just commented the line
and added the red line in /etc/X11/xorg.conf

Section "Screen"
Identifier "Default Screen"
Device "nVidia Corporation NV18 [GeForce4 MX 4000]"
Monitor "PHILIPS 107E"
Defaultdepth 24
SubSection "Display"
Depth 24
# Virtual 1400 1050
# 1280x1024 is the maximum resolution of the screen, according to the marketing info I found
# in the internet
Virtual 1280 1024
Modes "1024x768@60" "1024x768@43" "1024x768@70" "1152x864@75" "1024x768@75" "1280x960@60" "1024x768@85" "1280x1024@60" "832x624@75" "1400x1050@60" "800x600@60" "800x600@85" "800x600@75" "800x600@72" "800x600@56" "640x480@85" "640x480@75" "640x480@72" "640x480@60"
EndSubSection
EndSection

Saturday, February 2, 2008

User Agent Switcher

This is a wonderful add-on for firefox that makes webpages believe that you are using in fact MS Explorer. This is really useful with some problematic webpages

https://addons.mozilla.org/en-US/firefox/addon/59

http://chrispederick.com/work/user-agent-switcher/

FireFox Alexa Toolbar User Agent Hack for MegaUpload and SexUploader

(taken from http://www.mydigitallife.info/2006/10/18/bypass-and-crack-megaupload-and-sexuploader-download-slots-and-size-limit-with-alexa-toolbar-hack/)

  1. Download and install the User Agent Switcher extension for FireFox.
  2. Restart the FireFox web browser after installation ended.
  3. Go to Tools -> User Agent Switcher -> Options.
  4. Then click on User Agents and then click on Add.
  5. Key in the following information:

    Description: MegaUpload
    User Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Alexa Toolbar)

  6. Exit by clicking on OK twice.
  7. Whenever you want to download from MegaUpload or SexUploader, go to Tools -> User Agent Switcher and select MegaUpload as FireFox’s temporary user agents.
  8. After downloading the files, you may want to switch back to original user agents, by selecting Default.