Tuesday, January 31, 2012

Google is removing search results?

Google has begun filtering results for searches that involve copyright  violation. In my opinion this is just a beginning of a series of events that are going to happen with the pretense of anti-piracy that will end up hurting freedom of speech  and eventuality things will become like 1984 if they haven't already...
Here is the image that I got searching for "gotye somebody that i used to know mp3"




Update:
As Michael McGraw-Herdeg pointed out in the comments, this has been here for long time. I don't remember seeing this in the past but apparently there is a law preventing Google and any other companies from displaying links like this...

http://en.wikipedia.org/wiki/Chilling_Effects

http://www.nytimes.com/2002/04/22/business/new-economy-copyright-dispute-with-church-scientology-forcing-google-some.html?src=pm



Tuesday, January 17, 2012

MySQL create UTF database

The one command that I use very often and I always forget exactly how it was.  So here is how one creates UTF8 database in MySQL:

CREATE DATABASE dbname CHARACTER SET utf8 COLLATE utf8_general_ci;
Reference
http://dev.mysql.com/doc/refman/5.0/en/create-database.html

Saturday, January 14, 2012

Aria2 - awesome command line download manager

Back in my Windows days aka the dark ages, I was very into download managers.  This was probably because those days we had slow Internet like dial-up and cable with speeds up to 128 kbps down / 64 kbps up. So at these kind of speeds it makes more sense to use download managers, mostly  because you are waiting all the time and these managers made you feel that things moved faster even if sometimes that was not the case. Also IE was very dominant browser at the time and when it crashed  you would have to re-download instead of just continue, that was the biggest reason why I was using FlashGet, Go!Zilla and of course Download Accelerator Plus.

Nowadays download speed is rarely the issue, but sometimes we like to automate downloads. Great way to automate is using terminal based download manager. Aria2 has some very interesting features that we can use. Basically aria2 is a lightweight multi-protocol and  multi-source command line download manager. It has support for HTTP/HTTPS, FTP, BitTorrent and Metalink

There are many other alternatives that come to mind like wget or cURL but whit aria2 you can download files from several URIs using different protocols and also if you give aria2 list of files it will download them concurrently.
aria2 download very well: aria2 cancels slow servers and use the faster server to finish the download. In other words, it is very clever and reliable in many different situations and it does most of the downloads in parallel.

Installation

You can download it directly from SourceForge
I'm using the Linux version, but there are releases for Windows and Android but I can't say that I have tried them. There are also packages for most of the Linux distributions.  

For Debian based (Ubuntu , Linux Mint):

sudo apt-get install aria2 

Arch Linux

sudo pacman -S aria2 
Fedora and yum based
sudo yum install aria2

Few simple examples 
  • Download a file

 aria2c  location-or-URL-of-file

  • Download from multiple sources

 aria2c  location1 location2 location3 ... 

  • Download torrent

 aria2c location-of-file.torrent 

  • List files in torrent

aria2c -S location-of-file.torrent 

  • Download specific files from torrent

aria2c --select-file=1,2,3... location-of-file.torrent

index of files ( 1,2,3 ) can be  found with -S command
  • Limit speed for upload ( on torrent files for example )

aria2c --max-upload-limit=200K location-of-file.torrent 

 
  • Limit speed for download

aria2c --max-download-limit=100K location of file

 
  • Pause and resume
In order to pause just press Ctrl+C and to resume enter the same command at the same location. Aria2 keeps .aria2 files where it memorizes the current download progress.
  • Download using multiple connections

aria2c -j7 -x2 location-of-file  other-location-of-file...


this way we instruct aria2c to use 7 concurrent connections with max 2 connections per server
  • Download  a list of files from URI provided in a file

aria2c -i file-with-uris.txt 
 

Links

http://sourceforge.net/projects/aria2/files/stable/


Tuesday, December 27, 2011

Best of science fiction movies for 2011 or my sci-fi top 10


We can't really  say that this was one of the best years for sci-fi movies, maybe the year of remakes and sequels/prequels but there were few that were worth mentioning, so here we go :
10. Battle : Los Angeles

There are these kick-ass aliens coming to Earth with an invasion plan that includes taking over all major cities throughout the world. US has figured it out what is happening at the last minute bit it is to late. So since most of the bases are destroyed LA relies on a marines to save the day.  It has a lot of similarities to 'The war of the worlds' but with shooting and killing all over the place and that is all you should expect. A great action movie with awesome special effects but noting more.



9. Source Code
Another great action thriller centered on officer Colter Stevens who wakes up in the body of an unknown man and discovers he's part of a mission to find the bomber of a Chicago commuter train. The soldier, played by  Jake Gyllenhaal meets Michelle Monaghan, but since they’re both going to die in just a few minutes, well, there’s not much point in making friends. Also I must say it bears strong resemblance to classic 12 Monkeys.



8.Another Earth
On the night when duplicate planet shows up in the solar system, an ambitious young student and an accomplished composer cross paths in a tragic car accident. Let's say that a planet showing up from nowhere into our solar system somehow does not disturb the natural rotation of the planets and has no physical implications whatsoever to anything why would anyone pick such a painful topic ? This film is a  great tragedy but not a sci-fi movie, expect for the fact that a planet shows up from nowhere it is just painful and too slow. During the entire film you are going to feel like an ant pushing some big burden towards some pointless goal. So why is it even on this list ? Well it opens up a few questions for us. What would we say to ourself in  the other planet? Are they different from us? Is the other me a better person?
Has he/she done the same mistakes? Are we going to do the same choices in the future?


7. Super 8
Another great J.J.Abrams movie, so  what is the story : 
"In the summer of 1979, a group of friends in a small Ohio town witness a catastrophic train crash while making a super 8 movie and soon suspect that it was not an accident. Shortly after, unusual disappearances and inexplicable events begin to take place in town, and the local Deputy tries to uncover the truth - something more terrifying than any of them could have imagined."
Many people say that this was the greatest movie of this year but not me. This is not because there were many great ones but because Super 8 did not offer something new. On the plus side it has a big resemblance to Stephen King's 'Stand by me' with alien and military included. The good thing is that  Abrams is becoming more and more influential in the world of science fiction and the support from Spielberg definitely does not hurt.




6. Rise of the planet of the Apes

The original ‘Planet of the Apes’ is a classic film, with many memorable scenes like the one when Charlton Heston comes across a half-buried Statue of Liberty. This film is in a way prequel to the original and it offers  a believable  explanation as to how humans become second class citizens. Cure for Alzheimer's disease creates genetically-enhanced chimpanzee uses its greater intelligence to lead other apes to freedom. That chimp is the well known Cesar ...


5. The Adjustment Bureau 

The story is about an affair between a politician and a ballerina is affected by mysterious forces keeping the lovers apart. This is a  surprisingly engaging romance, based on a Philip K. Dick short story called Adjustment Team. The move starred Matt Damon as the politician David Norris who meats this beautiful ballet dancer Elise Sellas, played by Emily Blunt. The politician finds out that there are forces keeping them apart and he sacrifices everything to get the girl. Undoubtedly a great romance with a taste of fiction and great acting worth watching.



4. The Thing 

I loved the original 'The Thing' and for those of you who haven't seen it go for it right away, seriously find it on-line get it from amazon, just get it. The original has John Carpenter all over it and the role of R.J. MacReady is just perfect for Kurt Russel. The story of this movie comes from John W. Campbell Jr. and it's about scientists in the Antarctic that are confronted by a shape-shifting alien who very is into killing. The remake is not as good as the original but it offers a modernized version of the story and I believe that is worth seeing.


3. Limitless 

Interesting concept about a wonder drug that allows super human abilities. A failed writer takes this experimental drug that allows him to use 100 percent of his mind. When on the drug he evolves into the perfect version of himself, perfect intelligence and with that best possible decision making. Again not the classic sci-fi but extraordinary acting by Bradley Cooper and this movie becomes a great thriller.


2. Real Steel 
More of a family movie than a classical sci-fi, Real Steal is se t in the near future, where robot boxing is a top sport. Robo boxer, played by
Hugh Jackman, during his rise to the top, he discovers he has an 11-year-old son who wants to know his father. Together they try to make a mark on the robot boxing industry. The movie has elements of Rocky in it and that is not just because its about boxing. The reason why I liked this film so much is because it is very believable that in near future we could have something like this. Lot of innovation has been done in the name of entertainment why not boxing robots?     


1. X-Men: First Class

I'm usually skeptical about prequels because sometime they try too much to explain how characters we know became those characters. This was not the case for First Class, yes it did show what the lives were for Charles Xavier and Erik Lensherr before they took the names Professor X and Magneto, but they did it in a very interesting manner.  It showed how Magneto and Professor X discovered their power's and how close they were before becoming archenemies. In the process of working together, a rift between them opened, which began the eternal war between Magneto's Brotherhood and Professor X's X-MEN.  After watching it  I must say that X-Men world makes more sense, at least to those of us who only watched the movies...