Friday, November 28, 2008

build perl modules the debian way

apt-get install dh-make-perl

tar -pzxvf Locale-Hebrew-1.04
dh-make-perl Locale-Hebrew-1.04/

cd Locale-Hebrew-1.04
cd ..
ls *.deb
dpkg -i liblocale-hebrew-perl_1.04-1_amd64.deb

it works nicely.

Thursday, November 27, 2008

combine pdf files to one

2 ways

install gs or pdftk

pdftk first.pdf second.pdf cat output firstANDsecond.pd

or else

gs -dNOPAUSE -sDEVICE=pdfwrite -sOUTPUTFILE=firstANDsecond.pdf -dBATCH first.pdf second.pd

finnix a debian testing distro with lvm2



If we want to use lvm2 we need to be able to boot from a live distro and access the data.
Will we find this with knoppix/kanotix etc?

we need to be able to do

say we have a volume group data on a physical volume 'data'
vgchange -ay data

(if it was formally exported before from old system (fat chance) then you can do
vgimport data

mkdir /data
mount /dev/data/ /data
say to load the information

2. Lets say to start a new physicalvolume and create a volume group

vgcreate volgroup1 /dev/sda1


lvcreate -L5G -n logicalvolume
mkfs.ext3 /dev/volgroup1/logicalvolume

then can mount it

mount /dev/volgroup1/logicalvolume /data


Thursday, November 20, 2008

convert images to right size and format for presentations

convert a bunch of images to the right size for a presentation
try this

convert -sample 936x720 infile.xfc outfile.jpg

will do the job

Sunday, November 16, 2008

unwanted taps on trackpad while typing

a common problem for laptops.
what to do?

see stays on while typing

Touchpad stays on while typing

To fix this, the best answer I could find was this one, where you simply install a deb package to add a file to the Xsession.d directory, which gets run every time your start X. Here's are contents:

# Starts the Synaptic daemon which deactivates the touchpad while typing
# This executes for all users

SYN_IDLE=1 #Seconds to wait after last key press before enabling touchpad

if [ -x $SYNDAEMON ]; then

This is a very simple and elegant way to fix the problem. Click here to download the package directly.

dpkg -L xserver-xorg-input-synaptics

includes this program:

syndaemon - a program that monitors keyboard activity and disables the
touchpad when the keyboard is being used.

Thursday, November 13, 2008

create pdf of articles and books

Nice instructions are available from
on how to create pdf files from scanner of articles.
take a look at this.

Saturday, November 1, 2008

grab a few pdf files on web

#!/usr/bin/perl -w
use strict;

open (IN, "list");
my @data=;
my @out= map { local $_ =$_; s/(.*href=\")(.*)(\".*)/$2/; $_} @data;

my @out1;
my $pref='';

foreach my $example (@out) {
my $out=$pref.$example;

foreach my $stuff (@out1) {
#print "$stuff \n";
system("wget $stuff");

Using regex in Map function

need to localize if you want not to get all 1's as output of the map (since match return is
only 1, regexp substitution occurs in place with $_).

#!/usr/bin/perl -w
use strict;

open (IN, "list");
my @data=;
my @out= map { local $_ =$_; s/(.*href=\")(.*)(\".*)/$2/; $_} @data;

see merlyn at