SendEmail using perl script in Windows or Linux using any SMTP account.

2010-05-16 1 min read Linux

Technorati Tags: <a class="performancingtags" href="http://technorati.com/tag/email" rel="tag">email, <a class="performancingtags" href="http://technorati.com/tag/sendEmail" rel="tag">sendEmail, <a class="performancingtags" href="http://technorati.com/tag/Perl" rel="tag">Perl

There is a very nice little utility or rather SMTP client program called sendmail (<a href="http://caspian.dotconf.net/menu/Software/SendEmail/">Link — http://caspian.dotconf.net/menu/Software/SendEmail/).

This can be used in Windows or Linux or any other OS with perl installed and few other perl modules installed. Its quite easy to use and comes in quite handy to send emails.

In later posts we will see how we can use this in various ways : sending mail from your browser, from your editor or even from the command line or shell script.

Continue reading

Downloading all related videos from youtube with youtube-dl

2010-05-16 2 min read Fedora Learning Linux Uncategorized

How many time did you want to see all the videos (related) to the one you were watching on youtube but decided otherwise as the downloaded was not fast enough. Or has it happened to you that you wanted to <a class="zem_slink freebase/en/uploading_and_downloading" title="Uploading and downloading" rel="wikipedia" href="http://en.wikipedia.org/wiki/Uploading_and_downloading">download all the related videos, in either case you can use the youtube-dl utility I blogged about some times back. First you need to get all the <a class="zem_slink freebase/en/uniform_resource_locator" title="Uniform Resource Locator" rel="wikipedia" href="http://en.wikipedia.org/wiki/Uniform_Resource_Locator">URL&#8217;s in a <a class="zem_slink freebase/en/text_file" title="Text file" rel="wikipedia" href="http://en.wikipedia.org/wiki/Text_file">text file, and the simplest way to do this is :

Continue reading

6000+ truetype fonts for Linux

2010-05-13 1 min read Linux

Found a huge collection of fonts for linux. These are true type fonts and really a huge collection.

<a href="http://thelinuxbox.org/downloads/fonts/fonts.tar.gz">get here

updated: Forgot to mention that you can update the font cache without restarting the font server by executing the below command:

fc-cache -fv

Resolved - New window does not open in new tab after installation of some plugin's.

2010-05-13 2 min read Linux

After I installed some plugin&#8217;s, the new windows were not opening in the tab. Rather they were opening in new window. This consumes time and memory which I did not like. I checked and re-checked to confirm that the setting for opening new window in tab was in there and still ………. alas……..

So, I reverted to checking if I could do something in the about:config entries to do the trick and yes it was there. Before we go into the specific entry, if you are interested, here is the link to the mozilla site for documentation on the about:config parameters. If you want to tinker with the settings, I suggest you first go through the list and make sure what you are doing.

Continue reading

Processing XML on the Command Line

2010-05-12 1 min read Linux

<a href="http://bashcurescancer.com/processing-xml-on-the-command-line.html">The other day on the cURL email list, someone asked:
Could someone please tell me (preferably with an example) of how I could parse and xml like the following:

< ?xml version="1.0" encoding="ISO-8859-1" ?>


<file name="AMERI08.D4860.ZIP" />
<file name="DTCCRSF.D4861.ZIP" />
<file name="DTGSS01.D4862.ZIP" />
<file name="DTGSS02.D4863.ZIP" />
<file name="DTGSS03.D4864.ZIP" /


This is not appropriate for the cURL list, but I …

Removing duplicate RPMS.

2010-05-12 1 min read Linux

Got the script mainly with google search on the <a href="http://linux.derkeiler.com/Mailing-Lists/Fedora/2006-12/msg04156.html">link.

Nice trick..

Get the list of rpms with just the names
rpm -qa –queryformat &#8217;%{name}\n&#8217; > pkglist

Get the non-uniques list.
sort -g pkglist | uniq -d > duplicates

Get the versions of the duplicate files:
for pkg in `cat duplicates`; do
rpm -q $pkg » removelist
done

Now keep the rpms that you want to delete in the removelist

Continue reading

vi – the powerful Linux/Unix text editor

2010-05-12 1 min read Linux Vim Tips

We will talk about some vi stuff today:

Some fun first–>
1) <a href="http://www.vim.org/tips/tip.php?tip_id=664">http://www.vim.org/tips/tip.php?tip_id=664
2) help 42

Ok, coming to serious things-
References:
3) Linux cheat sheet:
<a href="http://www.lagmonster.org/docs/vi2.html">http://www.lagmonster.org/docs/vi2.html
4) <a href="http://www.venukb.com/2007/01/28/vivim-graphical-cheat-sheet/">http://www.venukb.com/2007/01/28/vivim-graphical-cheat-sheet/
5) <a href="http://www.eng.hawaii.edu/Tutor/vi.html#commands">http://www.eng.hawaii.edu/Tutor/vi.html#commands

Commands and tips:
6) Something that is difficult to find on the net is : how to create a numbered list in vi/vim? Simple, we will use macro's
To do this:
a> type number and terminatory ex: 1)
b> start recording using qa  . This will record the macro in a.
c> yank the line with yy
d> goto next line
e> press a to increment the number
f> End the macro recording with q
g> Play the macro with numner of times to repeat the actions. Example press 11@a
7) For repeating the last command you can use
8) You can put your vim settings in ~/vimrc and this can containg things like "set nu" and any other configuration.
9) Adding date in vi : :r! date
10) There is a variant of vi known as elvis which is quite nice
11) Similarly for viewing binary file there is a variant called bvi

Continue reading
Older posts Newer posts