Other Pages

Friday, April 25, 2014

10 Fun Linux Commands

 

One can never say it enough: the terminal is a very powerful tool, and is probably the most interesting part in Unix. Among the plethora of useful commands and scripts that you can use, some seem less practical, if not completely useless. I’ve selected for you a couple of commands that are useless because they are funny, but not funny because they are useless (or maybe the other way around for some). If you are searching forASCII art, random math curiosities, or various (in)utilities, this is the best of the useless.

1. cal

Few people know this, but any Unix system comes with a built-in calendar. To access it, you can simply type:

funny_commands-cal

This will display the current month. However, you can select the precise year that you want as an argument, and even the month. And to be fully useless, the option “-j” displays Julian days (the number of days from January 1). To sum up:

2. time cat

You can use this command as a built-in timer. It will run in the background until you stop it, and will then report the time elapsed between the start and the end of its process. As useful as it may seems, it is actually quite unpractical because you cannot check its value unless you stop it. I suppose it can become handy in a very specific situation but I have trouble imagining which one exactly. To launch just type:

and to kill, use the combination “Ctrl+c”

funny_commands-time_cat

3. yes

A very peculiar command with only one ability: repeating a string until its process is killed. Again, I don’t picture where it can be useful, but who knows? The syntax is straightforward:

funny_commands-yes

4. rev

This command is for reversing any input (as its name suggests). When I say reverse, it means that if the input is “Linux”, the output will be “xuniL”. Pretty strange, I know.

funny_commands-rev

You will enter an interactive mode. You can quit it by using the shortcut “Ctrl+c”. But rev can also work to reverse an entire file with

5. factor

It’s time to do some Maths. Let’s begin easy with the command factor which can decompose a given number into prime factors:

factor [number to decompose]

funny_commands-factor


I haven’t tested the limits of this command yet, but it seems pretty powerful. As a side note, prime numbers and the decomposition into prime factors is actually the basis for modern cryptography and Internet security. Knowing a little bit about them is always interesting. If you want to learn more, take a look at the RSA encryption.

6. Multiplication Tables


This is actually more a script than a command but it is impossible to ignore it when talking about funny stuff you can do in a console. By using

for i in {1..9}; do for j in $(seq 1 $i); do echo -ne $i×$j=$((i*j))\\t;done; echo;done

funny_commands-multiplication_tables


The terminal will display the multiplication table, nicely ordered in columns. Incredibly useless, and pretty long to remember, but you have to admit that it looks good.

7. PI


A bit more complex, you can calculate an approximation of pi through commands using

seq -f '4/%g' 1 2 99999 | paste -sd-+ | bc -l

funny_commands-pi


This combination of commands is a little bit harder to understand, but if you really want to know, seqgenerates the sequence of 4/1, 4/3, 4/4 until 4/99999 (without 4/2), paste merges these lines using a delimiter, and bc does the final approximation using a math library.

8. figlet


Figlet is a command for those who love to write in ASCII art. It greatly simplifies this task as it automatically transforms any given string. It comes with a bunch of fonts, by default at /usr/share/figlet/fonts/, and you can of course add yours.

figlet [-f path to the font] [string]

Note: You will need to install “figlet” before you can use this command.

funny_commands-yes_figlet


9. cowsay


cosway is very famous in the Linux world, but this command is not always present by default in every distribution. In Ubuntu, install it with the command:

sudo apt-get install cowsay

It displays a cow in ASCII art saying whatever string you want. It comes with a couple of other characters and you can add your own. The default directory for them is /usr/share/cows/. The syntax is:

cowsay [-f path of another character] [string for the cow]

funny_commands-cowsay


10. fortune


fortune displays a random sentence, in the same spirit as fortune cookies. It is not always installed by default so you may want to add it. In Ubuntu:

sudo apt-get install fortune

It comes with a very handy option: “-s” for short, which will limit to fortunes composed of one sentence or less.

funny_commands-fortune


Combinations


The fun part is now to combine the previous commands for a funnier result. A famous combination is fortune and cowsay, which creates a cow in ASCII art telling you a random fortune:

funny_commands-cowsay_fortune


My personal favorite is a random character from cowsay telling you a random short fortune:

cowsay -f "$(ls /usr/share/cows/ | sort -R | head -1)" "$(fortune -s)"

funny_commands-random_cowsay_fortune


To explain briefly, it is the same as earlier: a random fortune is pushed into cowsay, but I added the option “-f” for selecting a character. The path given is a combination of listing the files from within the default directory for the characters, random sorting of this list, and keeping only the first line.

But I suppose that you could also do something like

funny_commands-yes_figlet


in order to repeat a piece of ASCII art, or even

cowsay "$(seq -f '4/%g' 1 2 99999 | paste -sd-+ | bc -l)"

to have a cow telling you the approximation of pi.

As always when exploring the console, there are a lot of things that can be done (even if doing them seems very useless).

Sunday, April 20, 2014

7th Day - Good Thriller

 

Watched the new Malayalam Movie 7th Day at a Multiplex in Bangalore. The media has been going on and on about Prithviraj playing a cop’s role again. You will be pleasantly surprised when you watch the final suspense revealed at the climax of the movie.

There are  lots of twists and surprises in the story. The cast is full of new comers, all of them with little acting experience. But for a change, it was good to see that everyone has done a good job when it came to playing their roles on screen.

The screenplay is good. The direction, better. But I felt the real hero of the movie was the cinematorgraphy, by Sujith Vaasudev. The camera moves in ways different from what you usually expect. There is a lot of aesthetically captured scenes, and lots of slow motion captures as well. I specially liked the scenes on top of the waterfall, during the actual crime was in progress.

Slick packaging. And good background music & score to accompany. This movie stands out.

Wednesday, April 16, 2014

Wolf of Wall Street - Worst movie I watched in 2014

 

Yesterday,  I watched the torrent DVD rip of the Oscar nominated movie – The Wolf of Wall Street, starring Leonardo DiCaprio. And by far, this is the worst movie I sat down for this year.

Maybe it was because I did not agree with the morality of the story depicted. Or maybe it was the huge amount of profanity and nudity shown on screen. But nothing positive stood out.

Crap story.

Crap acting.

Crap direction.

Leo was nominated for the Best Actor Oscar for this movie ? For what ? All he does is grab nude girls and mouth profanity. And he was not even playing a mafia or drug lord. Any Hollywood A-lister idiot could have done that.

Thank God Leo did not win Best Actor , and Martin did not win Best director for this movie. Cause they are not worth it. The whole thing is one long ad for hookers and drugs.

 

 

I still think Leo’s best acting, was in Steven Spielberg’s Catch Me If You Can. And I still watch Martin’s Departed.

Tuesday, April 15, 2014

Happy Vishu…and start of a New Year !

 

Don’t be surprised by the heading. I am from Kerala, in India, and in addition to the Julian calendar, we follow a Malayalam calendar. And the new year as per this calendar falls on April 14th/15th of the Julian one. And we celebrate this day, calling it Vishu.

 

vishu

Wish you all a Happy Vishu, and a prosperous New Year ! And wish you a Happy Easter in advance too !

Thursday, April 10, 2014

Manjadikuru

 

Now usually, I steer clear of the so-called Award movies; these are the art-house movies, which win awards at various national and international film festivals. These movies are usually preachy, and made for the hard core movie aficionados. They don’t cater to the masses, and most of them do not receive promotions or support from mass viewers.

But every now and then, there comes a movie which does win awards, but for the right reasons. There is something genuinely fresh or new about it, you watch it, and are surprised how such a well made sweet labor of love went unnoticed. This happened to me yesterday, when I watched Manjadikuru, the debut movie of Writer-Director Anjali Menon.

I had heard about this movie earlier, but could not get a good print to watch it, but somehow tumbled on the youtube playlist somebody had uploaded. And I ended up watching the commercial release completely online (the wonders of modern technology).

And my verdict ? It’s a keeper ! If you are from Kerala, and grew up in the 70s/80s/90s, you got to watch this. I don’t think the current teenage generation will enjoy this simple story of relationships and memories the same way we grownups would. I cursed myself for not watching it earlier.

Manjadikuru refers the bright red seeds found very commonly in ancestral homes in Kerala. They are collected by kids for their color, but are not used in food preparations. Many consider them a useless plant, as neither it’s fruit/seeds nor flower is edible. Kids growing up in towns and cities today will not be able to relate to them, but the generation before, like me, have a nostalgic attachment to them.

The entire story of the movie is set in the past, though the exact time is not specified, it is somewhere in the 1980s. In the narrator’s own words, it was when life was much more simpler, before cellphones, before facebook, and before reality shows and tv serials. I guess the viewer is allowed to set whatever time period he wants to to enjoy the movie.

The central character of the movie is Vicky, the 11 year old son of a gulf malayalee couple, who come home to their ancestral home in Kerala to spend 16 days there. And these few days leave him with a lifetime of memories to cherish and learn from. Vicky and family are summoned home to attend the funeral of Vicky’s grandfather (played by Thilakan), the patriarchal head of the family. The whole joint family of uncles and aunts and cousins and distant relatives also are summoned to the funeral. The whole tharavad (ancestral home) is full of people, who have united for the common cause of the funeral, but who have their own problems within themselves and against each other. Vicky feels lost among this cacophony, and his legs are pulled by his cousin Kannan and his kid sister Manikutti. But the small trio of young ones create a small fun filled world of their own, free from grown-up problems.

 

After the funeral, whole join family is eager to know of the partition of property, and specifically, how will own the  big ancestral home itself.  The grandfather left a legal will, and there is a lawyer who is about the read it, but the grandmother of the family tells everyone to wait for 16 more days for the will to be read. After a death in a family, the family members traditionally observer 16 days of mourning, which ends in prayers for the departing soul on the 16th day, and a hoisted lunch. This is called the pathinaaradiyantharam, and is held 16 days after the death in the family.

Eager to know of the details of the property division, everyone agrees to wait for 16 more days in the home. This gives Vicky and his gang 16 more days to spend together in the country side, which is what the movie is all about. Vicky learns so much in those few days, of life & death, rich & poor, love & hate in addition to a little swimming Open-mouthed smile. The entire movie is pictured in the lush green countryside of a small village in Kerala, during the onset of summer.

The first thing which stands out, is the casting. Every character is splendidly cast, from the grandfather , right down the little kids, and Roja, the Tamil child servant the family employs. The characters are not that colorful, but are believable and relatable. If you have a bunch of relatives in Kerala (or anywhere else, for that matter), you would have come across such characters.

There is the eldest son (played by late vetran Murali, in his last role) who, after having become a naxalite at one point, discovered religion, and became a sanyasi, after tarnishing the family name. Later , he would confess to his mother and he wore the religious colors as a form of protection, because he was scared for his life.

There is the younger son Raghu (Rahman), who has shifted from the family home and is living in a smaller house in the same land property. There is a case between him and his late father regarding the separating wall. He is the only child who stayed back in the countryside to look after his parents, while everyone else went abroad or away in search of better life. But according to the remaining family members, Raghu did not leave, because he had no where to go, and ended up becoming nothing in life. He and his wife are the parents of the mischievous Kannan and Manikuttee.

There is middle daughter Sujatha (Urvashi), mother of Vicky, who chose to marry a Gulf employed Hari, because she wanted a better life for herself and her family. It is revealed later that she was once in love with someone in the village, but decided to marry a better employed and settled Hari, following her head instead of her heart. She is constantly bickering to everyone, even to her son.

There is the younger daughter Ammu, who is married a government official in Delhi. To outsiders, hers looks like a perfect happy marriage, but her husband (Jagathy) is very unhappy with her, and overworks her at home too. Their teenage daughter having been brought up in the city, hates village life , and wants to run back home. She is having an affair with another distant relative ,a teenage boy.

The youngest daughter , Sudha, is married to someone in the US, and is visibly pregnant. Her husband has not accompanied her, apparently due to his work, but it may also be due to already developed cracks in her  marriage. A few years abroad has already transformed her to life’s luxuries; the others are already jealous of her comfortable US lifestyle.

And then there are …the kids. The crown jewels of the set. The three kids who try to enjoy life and the countryside the most are absolute gems ! They first face off, the friction between Gulf educated , well to do Vicky, and the relatively unfortunate Kannan and Manikutty made very visible. Vicky is humble, keeps to himself, and adheres strictly to being neat and tidy. But he is kind at heart, and ready to share his toys and many chocolates as well. The entire movie is narrated by grown up Vicky, so it is his point of view, that we get to see.

Kannan and Manikuttee, on the other hand, grew up in the village. They are smart, mischievous, and talk a loot. Kannan has most of the smartest dialogues among them. And he is also the protective elder brother to his kid sister. His pre-conceived notions about Vicky and the Gulf malayalee lifestyle breaks down fast, when he starts bonding with the every generous Vicky. In the final scenes of th movie, you can see their heart break when Vicky has to return to Gulf, with chances that they may never ever meet each other once the property gets divided.

 

 

But the star of the casting show here is Roja, the migrant Tamil teenage home maid. She speaks broken Tamil and Malayalam, and is made to do every chore in the grand house. She does not complain though, even after being over worked and beaten and punished by the family. The grandmother in the family is the only who does not shout at her. Her pain is visible only to the kids, who together hatch a scheme to save her, and to send her back to her hometown in Sivakasi. The kids succeed, of course, and put Roja on a bus home, but she has is found and has to return in the final moments, her return having something to do with the climax of the movie.

 

The screenplay flows, covering both the wonderful kid’ world, as well as the tumultuous life of the elders equally well. The background music and theme imprints on the nostalgia factor. The scenes are sure to take you back on a journey to your childhood.

My only gripe would be in the songs section. I watched the longer theatrical release, which according to wikipedia, has more scenes and songs than the initial release. None of the songs stayed in my memory. But these can be skipped, as the songs themselves do not add anything new to the movie. The one scene which stood out was the ending of the thiruvathira song, where characters move from the thiruvathira dance steps to taking aggressive fight steps, waking Vicky from his dream turned nightmare.

The dialogues are nicely written. The young ones speak their characters, Vicky, having been brought up abroad, uses English when he is confused about the true Malayalam words. Towards the end, however, his Malayalam vocabulary increases, along with his confidence. The sanyasee maamman speaks in riddles, due to his religious believes. The women in the household all are quick tounged, speak aggressively, along with Raghu, who despises everyone. But, none of the characters speak in the trademark Thrissur region accent. The village is revealed to be in Thiruvillamalai, in Thrissur, where the locas speak in a characteristic regional up-and-down accent. But none of the characters show even a hint of this trait.

After all these problems, the movie ends on a happy note. A happy ending is what the this nostalgic and fun journey down memory lane.

Lok Sabha Elections: Google Launches 'Know Your Candidates' Tool To Help You Make Informed Choices

This new tool will allow citizens to get easy access to relevant information about political candidates contesting from their constituency.

Tech-giant Google launched a new tool as part of its elections portal google.co.in/elections', called ‘Know Your Candidates'.

What will the tool do?

The new tool will allow citizens to get easy access to relevant information about political candidates contesting from their constituency and their incumbent Member of Parliament. This tool integrates publicly available information sourced from Indian organizations such as the Association for Democratic Reforms (ADR), PRS Legislative Research and Liberty Institute India.

Details available:

*The tool will provide info for each sitting Lok Sabha MP and contesting candidates such as their disclosed educational background, financial details and social media presence.

*Mapped onto Google Maps interface, citizens will be able to find the information by using pin codes of their area or by zooming on their locality on the map.

*The tool will be updated regularly to provide information about all candidates as they get finalised.

What do experts have to say?

Prof. Trilochan Sastry, a founding member of ADR applauded this launch saying,"We are delighted to collaborate with Google to launch this tool, which will help our concerted effort to disseminate to the citizens of India the background information of the candidates contesting the Lok Sabha 2014 elections that will enable them to make an informed choice during voting. As citizens we have to play a proactive role in ensuring that we choose politicians who are clean, honest and committed to the progress, security and development of the people of India, and we at ADR have been working on deeper reforms including political party reforms and in the last few years have obtained several landmark judgments from the Supreme Court and Central Information Commission."

What Google says:

Commenting on the launch, Rajan Anandan, VP and Managing Director of Google India, said "In the last five months, we have made a concerted effort to provide our users a one stop destination for all their information needs for the upcoming Lok Sabha elections. With the launch of this tool, we have added all the important information of the contesting candidates with the help of groups such as ADR and PRS Legislative Research who have been doing a stellar job of collating all the important information about the candidates. We hope that making this information easily accessible will help Indian voters learn more about candidates running for public office and help them to make an informed decision."

Meanwhile Facebook and Youtube have joined the Lok Sabha election space.

Facebook adds “I’m a Voter” button

Facebook has launched a new feature for Indian voters, which will remind them to vote at the 2014 General Elections, and also let them share their participation via an “I’m a Voter” button that they can click after casting their vote.

Youtube creates page for LokSabha elections:

YouTube has created a page for Lok Sabha Elections 2014 and it is subset of Google’s Election page. This page is filled with videos from all news channels and other sources about key leaders, manifesto release etc. 

Watch the videos below:

Video by Google promoting voters to exercise their rights:

Uber to offer free rides on polling days in Delhi, Mumbai, Bangalore, Chennai and Hyderabad

Premium cab service Uber is offering free rides to its users on the days polls for Lok Sabha elections are held in Delhi, Mumbai, Bangalore, Chennai and Hyderabad. Under the offer, Uber will give away two rides up to Rs 1,000 each when people use a special code. The offer will be available to both existing and new users.

Tuesday, April 1, 2014

The irony of the Information Age

 

 

"The irony of the Information Age is that is has given new repectability to uninformed opinion" - –Veteran reporter John Lawton, 68, speaking to the American Association of Broadcast Journalists in 1995

 

 

Quotation from the opening pages of the excellent Michael Chrichton novel, Airframe.