Thursday, November 24, 2011

Fixing Skype video aspect ratio on Linux



Linux is the main OS in my laptop and I use Skype a lot on it. Unfortunately Skype support on linux sucks! Now that Micro$oft bought $kype it should be worse! I'm gradually moving to Google talk video, but a lot of contacts (specially my family) still use Skype only.

Because is poorly developed Linux version of Skype doesn't allow resize the video window and aspect ratio. This is a pain when you have a HD Webcam because Skype always start a video call with a 640x480 ratio (HQ video call) and switch automatically to HD quality (1280x720) if your connection is higher than 30KB/s. Instead of change the aspect ratio from 4:3 to 16:9 Skype shrinks the HD video in a 4:3 frame, which make your video really weird for the other person causing a "wobbly" image effect some times.

Wednesday, November 9, 2011

Creating and maintaining Perl command-line scripts

image
In bioinformatics 90% of Perl scripts are command-line scripts and they should be written fast (because our bosses want results at the end of the day). Of course, Perl is perfect for this task, also called "quick and dirty" scripts and you may think will be fine create a messy script that will be used just once, right?

But a problem with "quick and dirty" scripts is that they usually live more than one run. Sometimes it becomes part of your mainstream pipeline and maintain that script is a pain.
Well, so how can we avoid unmaintainable command-line scripts?

Friday, November 4, 2011

Recursive download from ftp directory with wget without copying the entire tree structure

A simple and fast way to download recursive directories with wget. Suppose that you want to download the entire directory "igblast" from http://mirrors.vbi.vt.edu/mirrors/ftp.ncbi.nih.gov/blast/temp/igblast/.
If you execute the following command you will get the entire directory tree structure beginning from 'mirrors.vbi.vt.edu' (only the structure, not the files because of the argument --no-parent).

To get "igblast" files and directories only, execute the following command:

Where -nH remove "http://mirrors.vbi.vt.edu/" and --cut_dirs remove the others directories.