Sunday, February 20, 2011


iptables can block Internet access to application running as a specific group or user. So to enable application specific Internet blocks can be achieved this way:

Add a group which we can then add to the blocked list. I am adding here a group named 'nosoupforyou'

addgroup nosoupforyou

Set a password for this group
gpasswd nosoupforyou

Add iptables rule to enable blocking. This will drop all packets created by nosoupforyou
iptables -A OUTPUT -m owner --gid-owner nosoupforyou -j DROP


finally run a program as this new group
sg nosoupforyou /usr/bin/firefox

You will notice that if you start firefox this way, you can not access any sites at all. You can just start any other programs you would like to block from accessing Internet.

Posted by Posted by WL at 9:05 AM
Categories:

0 comments  

Tuesday, February 8, 2011


To explode/burst/split a pdf files into multiple files of single pages

pdftk file.pdf burst

To join multiple PDF files into a single PDF
pdftk *.pdf output single-file.pdf

Posted by Posted by WL at 9:23 PM
Categories:

0 comments  

SVN

Friday, January 21, 2011


To import already existing code to SVN repository:

1. Create a new SVN repository

svnadmin create path-to-repository

2. import to this newly created repository
svn import -m "INITIAL REVISION" repository-name svn+ssh://username@host/path-to-repository

Posted by Posted by WL at 11:00 AM
Categories:

0 comments  

CVS

To create a new repository:

Create the directory and then use

cvs -d directory-name init

To import already existing code into this new repository:

Go under the directory where the code is located
cvs -d repository-path import -m "Initial Imported Revision" module-name vendor-tag Release-tag

Posted by Posted by WL at 10:57 AM
Categories:

0 comments  

Friday, July 9, 2010


First install libchm-bin by

apt-get install libchm-bin

Then extract the files by
extract_chmLib your_book.chm folder/

Posted by Posted by WL at 9:48 AM
Categories:

0 comments  

Thursday, May 6, 2010


To extract part of a hugh file you can use SED. For example to extract from line 10,000 to 20,000 you do this :

sed -n 10000,20000p file.log

Posted by Posted by WL at 1:24 PM
Categories:

0 comments  

Wednesday, May 5, 2010


To concatenate PDFs use ghost script this way

gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=output-file.pdf p1.pdf p2.pdf

Posted by Posted by WL at 12:44 PM
Categories:

0 comments  

 
>