Sunday, June 10, 2012

Convert JPEG to PDF

WOW there is a very simple tool which comes along with Ubuntu called convert

$convert input.jpeg output.pdf

Wola that is it we have the image in a PDF form now enjoy :-)

Sunday, June 3, 2012

Adding WaterMark

To add WaterMark to an image we can use the tool which ships with Ubuntu

$composite -dissolve 10% -gravity south input_file.jpeg watermark.jpeg output.jpeg
$composite -dissolve 10% -gravity south watermark1.jpeg IPTables1.jpeg output.jpeg

Here 10% is the brightness of the watermark1.jpge
-gravity south will pull your image to the bottom

Friday, June 1, 2012

nethogs - See which process is eating Bandwidth

Today I discovered that nethogs will show exactly what I wanted (i.e) group the process which are currently active and which are transmitting over the Ethernet\wireless.

#apt-get install nethogs

You need to start nethogs as root

#nethogs


Squid Configuration - Part2


Monday, May 21, 2012

Squid Configuration - Part1


Apache Port Changing on Ubuntu

To change the default port on which Apache listens to on Ubuntu and to access the webpages over the same rename all port 80  to 999 as I have shown.

root@Bodhidarmar:/etc/apache2# grep 999 ports.conf
NameVirtualHost *:999
Listen 192.168.56.101:999
root@Bodhidarmar:/etc/apache2# grep 999 sites-available/default
less-than VirtualHost *:999 grt-than
root@Bodhidarmar:/etc/apache2#

Now access http://IP-address:999

Saturday, May 5, 2012

Making ISO file on Command Line

To make a ISO file on the command line is very simple.

bala@bala-lappi:~$ mkisofs -V PDF -J -R -o pdf.iso PDF/
I: -input-charset not specified, using utf-8 (detected in locale settings)
Total translation table size: 0
Total rockridge attributes bytes: 454
Total directory bytes: 670
Path table size(bytes): 10
Max brk space used 0
814 extents written (1 MB)

bala@bala-lappi:~$ ls -ltrh pdf.iso
-rw-r--r-- 1 bala bala 1.6M 2012-05-05 12:20 pdf.iso
bala@bala-lappi:~$ file pdf.iso
pdf.iso: # ISO 9660 CD-ROM filesystem data 'PDF                       

Now to record that to a disk on cmd link, -v for verbose    '
bala@bala-lappi:~$ cdrecord -v -eject pdf.iso