Skip to main content

Posts

Showing posts from November, 2011

A script to extract audio from a bunch of video files

This sript extracts the soundtrack from any video format and converts it to mp3. Put all videos in a single folder and run this script on them. This works on all kinds of video. This is specially useful on those bunch of youtube videos.
It works like flv to mp3, mp4 to mp3, avi to mp3 etc.
==================================


#!/bin/bash # convert-video-to-mp3 v2.0 by JOnes. # This sript extracts the soundtrack from any video format and converts it to mp3. # Put all videos in a single folder and run this script on them. This works on all kinds of video. This is specially useful on those bunch of youtube videos. echo -e "\nThis sript extracts the soundtrack from any video format and converts it to mp3. Put all videos in a single folder and run this script on them. This works on all kinds of video. This is specially useful on those bunch of youtube videos.\n\n"
if [ ! `which mplayer` ] ; then echo -e "Install mplayer \nsudo apt-get install mplayer" exit 0 fi
if [ ! `which lame`…

Internal Field Separator (IFS)

Internal Field Separator (IFS): This internal variable in bash shell turns out to be an indispensable tool in these days of spaces and other weird characters in filenames. Anyone who has tried to script in bash which involved accessing lot of filenames have definitely come across the problem of spaces in filenames.
The problem is this. It becomes impossible to split a directory listing "ls" into filenames using just the for $i in `ls` command. And the reason is simple. The directory listing separates filenames by spaces but the filenames themselves might have spaces. So the for command cannot figure out where the filename ends and where it begins. That is where this neat trick comes in. We have to tell bash to ignore all separation symbols other than newline while splitting up the directory listing into filenames. This means each line would be a new filename. And we have to make sure that each line has a new filename. This is easily achieved by the "ls -1" command.

A story about fats

Essential fatty acids(EFA)It is required by humans but cannot be synthesized inside the body. e.g. - α-linolenic acid (ω-3, pronounced as omega-3), linolenic acid (ω-6, pronounced as omega-6) are primary EFAs. Others include γ-linolenic acid (ω-6), lauric acid (saturated fatty acid). Unsaturated fat In cellular metabolism unsaturated fat contains less energy than equavalent amount of saturated fat. The greater degree of unsaturation in a fatty acid (more double bonds) makes it vulnerable to lipid peroxidation (LPOX). LPOX is a method where free radicals steal electrons from lipids in a cell membrane causing cell damage. It ruptures RBCs and the end products are mutagenic and carcinogenic. Antioxidants can protect from LPOX. So it is better to take antioxidants along with unsaturated fats. Insulin ResistanceThere is a direct correlatopn between “Insulin resistance” and “inlfammation” and there is also correlation between “inflammation” and “fat ratio” ω-3/ω-6. ω-3 and ω-9 are anti-inf…

World without Jobs

The following post is specially for those Jobs fans who are cried their hearts out for three weeks.
I looked carefully then it is clear that his aura is methodically created by some agency over years using well strung stories of triumph over setbacks.
Does the series of gadgets changed our lives? No. because most of us did not start using those because they are so restricted and expensive.
The real change came with the release of the Android OS. Now, we have a gadget that can moonlight as a mini computer. The credit of genesis of the idea of Droids are sadly attributed to Jobs and iPhone again. But that is not true. Droids might be inspired by it but it is an open source product , light years away from Jobs philosophy of intellectual ownership. Now, who patents finger gestures :) other than you know who.
If greatness is to be measured by the length by which someone pushed the human civillization then Gates takes first place. At least he worked hard to create an OS from scratch and Windo…