Thursday, May 14, 2009

SSH Hosts

Why should ssh shell.example.com -p 2345 -l example be used when you can use ssh shell?

Create $HOME/.ssh/config file if it does not already exist. Populate it with the following data:

Host shell
User example
Hostname shell.example.com
Port 2345

That is it! You can now just ssh shell.

Thursday, December 25, 2008

Finding the latest linux kernel version

I always like to run the latest linux kernel. I found that I kept checking http://kernel.org/ at regular intervals. Thus this script was born: latest_kernel.pl.

Wednesday, December 24, 2008

WWW::Rapidshare::Free

Just released WWW::Rapidshare::Free Perl module for all free users of Rapidshare. Check out the example directory for a sample script. You can expect a GUI soon!

Tuesday, December 23, 2008

Christmas Tree

perl -MAcme::POE::Tree -e 'Acme::POE::Tree->new()->run()'

Wednesday, November 26, 2008

Checking External (WAN) IP

You can use:


curl whatismyip.org
wget -qO - whatismyip.org

There are many other ways too.

Tuesday, November 11, 2008

General Purpose Bit Flag not being set

This is an unreported bug in the Archive::Zip Perl module. This means that the level of compression will not be stored in the archives that are created, which may cause trouble with some extractors while inflating. PKWARE's application note on the .Zip file format states that these flags should be set.

Please see: http://use.perl.org/~alanhaggai/journal/37727 and http://use.perl.org/~alanhaggai/journal/37735.

Thursday, October 30, 2008

Bash Completion

Bash completion is a very good feature in Bash. We are able to complete filenames, just by pressing <TAB>. I had downloaded a YouTube video related to Tsar Bomba. Since YouTube videos are Flash Video files (.flv), I was not able to complete their filenames by pressing <TAB> in the terminal when trying to invoke mplayer.

A quick inspection of /etc/bash_completion solved the problem.

In mplayer(1) completion section,
_filedir '@(mp?(e)g|MP?(E)G|wm[av]|WM[AV]|avi
|AVI|asf|ASF|vob|VOB|bin|BIN|dat|DAT|vcd|VCD|ps
|PS|pes|PES|fli|FLI|viv|VIV|rm?(j)|RM?(J)|ra?(m)|RA?
(M)|yuv|YUV|mov|MOV|qt|QT|mp[34]|MP[34]|og[gm]|OG[GM]
|wav|WAV|dump|DUMP|mkv|MKV|m4a|M4A|aac|AAC|m2v|M2V|dv
|DV|rmvb|RMVB|mid|MID|ts|TS|3gp|mpc|MPC|flac|FLAC|flv)'


flv was appended at the end. That was it. Problem solved! Happy viewing!