Mac : Create Password Protected Folder

The Disk Utility app of Mac allows one to create a password protected folder. An encrypted disk image is created. To mount the disk one has to enter the password set at the time of creation. The steps to create one is very easy.

Open up the Disk Utility app. Goto File -> New -> Blank Disk Image. Enter a name for the image. Choose the location. Disk name will be the name of the mounted image. Set a size that you want. Importantly enable encryption from the drop down. And for the image format drop down, select the Sparse Disk Image option. Click on create.

A new window comes up to set a password. Remember to uncheck the “Remember password in Keychain” option. Set the password and you are done.

Double clicking on the image file will bring up a window to enter the password. Authenticate yourself and you’ll see that the image has been mounted. Add files, remove files, etc and do whatever you want to. Remember to eject the image after your work is done.

There you go. A password protected image is all setup.

Popularity: 1% [?]

Mac : Impressed With The Battery Life

It was only a week ago that I switched to Mac from Windows and my 10.7 Lion has already impressed me with its battery life. With battery level down to some 60%, I was able to play audio songs on my iTunes through out the night.

I started iTunes at 11 in the night and queued 132 songs for playing. No more activity. I left the lid as is, switched off the lights and went to bed. I woke up at 5 in the morning and the songs were still playing. Happily I dozed off again. The music had stopped when I next got up at 7:30.

But being able to play music for 6 hours with only 60% battery is an amazing battery performance. Really impressed!

Popularity: 1% [?]

EPL: Wigan Athletic vs Chelsea – Dec 2011 – Post Match

Villas Boas

Villas Boas

My reaction after the substitutions – WTF is going on in AVB’s mind?

Bringing on Kalou in place of Romeu made technical sense. A 0-0 scoreline against a weaker opponent suggests the introduction of a more attacking player. The choice of player in this case wasn’t something that pleased me though. Whenever I see Kalou, I am reminded of the handball and subsequent penalty given by him to Valencia in the dying moments. This guy doesn’t inspire confidence.

AVB’s next move is more baffling. He brings on Mikel for Mata! Dude. Just 1 up against a team fighting the relegation threat, one must always be on the offensive. Sacrificing your most creative piece for a player who doesn’t deserve a place in any of the top teams makes no sense at all. With this move, Chelsea went into a 4-2-1-3 formation. The only motive at this point was to desperately hang to the lead. And that’s something you do against a better opponent and not Wigan!

The third substitution was absolutely scandalous. Pray tell us the name of the Oracle that told you removing your goal scorer for a lame runner will benefit your side. At this point Wigan were already pouring forward trying to get the equalizer. AVB’s move – let me pick up someone randomly from the field and the bench and swap them. Gosh! That’s terrible.

All this while when Chelsea were in trouble I have defended AVB. But today I am forced to ask what his plans actually were? What was he really expecting his substitutes to accomplish? How can he publicly state that he’ll help Torres find his best form and never give him a chance to play?

I think AVB has totally lost his plot. The pressure’s gotten to him. He has finally bowed down and abolished his attacking principles. The complete 90 minutes Chelsea were playing a purposeless game. There was no real passion or determination to win the game. They just sat back to defend and hoped they get a goal as a gift. It was a drab, dull and boring match. A waste of 90 minutes. Nightmarish. This was just as terrible as the 5-3 drubbing by Arsenal. They could have just bent over and saved themselves the humiliation of almost getting beat by an 18th placed team.

I don’t know what else to say. There was not a single minute in the game when Chelsea looked confident or a title challenger. Easily one of the worst games of the season so far.

Popularity: 1% [?]

Opportunity For The Golden Boy?

Fernando Torres

Fernando Torres

It’s been an year of disappointment for our new number  9 – Fernando Torres. Having sealed a big money transfer from Liverpool on the  January deadline day, he has failed to match the expectations. Yes he was completely out of form when he joined us, but he’s had an year to improve on that. An year is no little time.

With AVB and his new philosophy Torres looked like getting some of his charisma and form back for good. He was good against Manchester United -discount the missed chance – played well in the next match before getting red carded and also scored in the next Champions League game. More importantly, his movement was good and he was willing to run and create opportunities for himself. And then somehow all the hard work was undone and Torres became the same lonely sad figure he was earlier. He has now lost his position in the Chelsea first team. Even for Spain he starts on the bench!

But then yesterday such events unfolded that could revitalize his campaign. There were rumors that he had been put on the market. AVB quashed the rumor insisting that there were no plans to offload the striker – not now nor in summer – a morale boost? Then Drogba will be leaving for the African Cup of Nations in January. We will be left with Torres, Sturridge and Lukaku as the only strikers. Sturridge will start on the wings till we get a new winger. Lukaku still needs to adapt to the English football. This could mean that Torres start each match in January as the central striker – golden opportunity. And then David Villa got himself injured and is expected to face some 6 months on the side lines. Torres does well for Chelsea and he’ll be an automatic selection for the Spain national team – does one need a bigger motivation than this?

The next 50 – 60 days could make or break Torres’s career at Stamford Bridge. I hope he shines. I am desperate for him to score goals for us.

Popularity: 1% [?]

EPL: Chelsea vs Manchester City – Dec 2011 – Post Match

Chelsea vs Manchester City

Lampard converts a penalty to hand Manchester City their first loss of the season

Did you just see how Lampard celebrated his penalty conversion? Did you notice his passion for the club? Well one thing is certain, he won’t be leaving the club any time soon. And if any manager dares to put him on the transfer list he’ll receive a lot of stick for such an action.

But the writing on the wall is a sure sign that we are moving away from the era dominated by Terry, Cech, Lampard and Drogba. In the past it was mostly Lampard who would take the free kicks. 99% of the penalties were also taken by him. But that role has now passed on to Mata as AVB explained after the match. Slowly but surely a new team is being built with Malouda and Anelka already relegated to the bench in favour of Sturridge and Mata. Also Mikel finds no place for himself as the more technical and quick Romeu has proven to be more than adept at that position. And with Drogba leaving for the African Cup of Nations in January, who knows how much good will it do to Torres and Sturridge. Perhaps when Drogba returns we’ll already have 3 top central strikers – Lukaku being the third.

The game began just as I had expected. Chelsea started with the same attacking philosophy and the high defensive line and were immediately penalized by a marvelous Aguero setting up Balotelli’s goal. Another 10 minutes of misery and our defenders decided to abolish the high line and defend deeper. The impact was immediate. Manchester City were no longer able to find space to trouble Cech and our quick midfield counter attacked whenever given the chance. And then with a moment of Sturridge’s brilliance Meirless found the net to equalize.

Second half started on a better note for Chelsea. Now that we were defending deeper, the confidence cascaded across the team and we got forward a lot more. Clichy’s wretched night saw him earn a second yellow. In all fairness he was no match for Sturridge on that day. With Manchester City down to 10 men, their game plan was to defend and hold out for a draw. This spurred us on. And once again Sturridge was the man of the moment. His shot was blocked by Lescott’s hand and a penalty awarded to Chelsea. Lampard converted the penalty with ease. From that moment on, there was no looking back. A deserved victory saw us cut down the difference to the top of the table to 7 points now. With any luck, if Manchester City were to lose to Arsenal and Chelsea win against Spurs, we will have a great shot at the title.

Romeu seems to have made the DM position his own. He is so calm at the ball, it’s as if he has a while minute to decide whom to pass the ball. That was something missing with Mikel. Ramires and his bursts of energy has seen Chelsea attack a lot more through the right wing this year. Earlier it was the combination of Cole and Malouda on the left that did the trick for Chelsea.

But once again we had to rely completely on Drogba for the central position. This is something that continues to worry me. Lampard is already being phased out and we need to do the same with Drogba. Torres needs to play more. We need to have faith in him for the long term.

Popularity: 1% [?]

EPL: Chelsea vs Manchester City – Dec 2011

Chelsea vs Manchester City

Chelsea vs Manchester City

It’s the big one today. We face the table toppers at our home. It’s the clash of a fearsome attack against a shaky defense. And I’m afraid. Already AVB has declared that if we lose this game our title race is all but over. A win is vital today and nothing else will do.

Manchester City has set the premier league alight with an amazing display of attack. Having scored 48 goals in the first 14 matches they’ll beat Premier League’s record of highest number of goals – 103 by Chelsea in 2009 – 2010 season – by a big margin. It’s their latest acquisition – Sergio Aguero – who has been the most devastating. He is a potent goal scoring machine. And what makes it worse is that Chelsea had kept tabs on this guy and he could have been in our team had things turned out differently (we put our faith in Torres).

Not to forget David Silva. The guy picked up from where he left the previous season. He’s arguably among the best midfielders in the league, if not the best. He is their main architect.

I’m afraid that these two could rip apart the Chelsea defense just the way they did it with Manchester United, more so if AVB decides to revert back to the high defensive line that our back four are so uncomfortable with. That brings us to the main question – what is going to be AVB’s strategy today? Will he defend deep like he did against Valencia in a do-or-die game? Seems likely because he cannot risk losing this game and slipping 13 points off the top. In fact, he might just play the same team that defeated Valencia by counter attacking which means that Torres will spend another game watching from the bench. Mancini would suspect the same. So will AVB surprise everyone by doing just the opposite and play like Chelsea played against Manchester United – remember had our strikers been more accurate we could have won that day.

For this game I do not want to voice my opinion. I just want us to win this one – hook or by crook. We cannot afford any more losses. And AVB needs a few victories for all the unpleasant rumors to die down. Only by winning a few matches can he gain the confidence of fans and experiment.

I’ll be watching the game with my fingers crossed.

Popularity: 1% [?]

Impossible Null Pointer Exceptions

I must admit this had never occurred to me before but after reading, the explanation seems so obvious!

You can get NullPointerException from lines in Java which appear to have no possibility of throwing them, such as;

this.setCount(num)

The null pointer exception can come about when num is of type Integer and setCount takes an int parameter. Java’s auto-boxing will automatically call num.intValue(), and if num is null you get an exception.

Of course, the fix is to check for null-ness and treat it however the semantics of your operation requires.

From the SDE Tip – Amazon

Popularity: 1% [?]

Find Files Of A Given Name Instantly

Usually when I have to find a file, I use a find and a grep command together – because I still haven’t learnt to use find properly. This is what I do:

find -L . | grep <name>

But this process is usually slow as it traverses the whole directory structure recursively following the symlinks to find all the files and then greps for the name that I need.

Recently I learnt about a faster way of doing the same – use locate to find files of a given name quickly. The command is:

locate <name>

It creates an index of all the files on the system and searches off it when called for. The index is rebuilt (by default) once a day by a cron’d find so results maybe stale by 24 hours.

If locate is not already present on your system, you could install it by:

sudo yum install mlocate

From the SDE Tip – Amazon

Popularity: 1% [?]

Save File With Sudo Permissions In VIM

A lot of time I open a file, make changes and when the time comes to save it realize that I hadn’t sudo’ed it. Learnt that the following command helps:

:w ! sudo tee %

Here’s the reason:

:w tells the vi to save modification of the file

! sudo tee executes the tee command with sudo permissions taking it’s input from :w

% here means the current file name

From the SDE Tip – Amazon

Popularity: 1% [?]

CL: Chelsea vs Valencia – Dec 2011 – Post Match

Chelsea vs Valencia

Chelsea vs Valencia - The Drog Show

The match result left me ecstatic.A 3-0 victory on a night when there was everything to lose speaks volumes of our players nerves. I am a Chelsea fan and loved the Champions League results – the arrogant Manchester United dumped out by Basel and Manchester City humbly shown the exit door by Napoli.

It was a vintage performance by our team – reminds you of the Mourinho and Anchelotti era. Without the ball we defended passionately and with it tried quick counter attacks. There was no desire of ball retention at all.

This was a night dictated by our Old Guard – Terry, Cech and Drogba, sadly Lampard was missing the action. Once again they rose from the ashes of criticisms to put on a grand show. Cech made wonderful saves diving full length. He kept the Valencia attack at bay with ease. There was only one chance when the ball hit the side bar immediately after Chelsea had scored. Otherwise Cech commanded the goal majestically. Terry and Ivanovich stood like walls in front of their goal keeper. Diving into everything, they made sure that the opposition strikers don’t get a chance to come any where near the goal. Valencia had to be content with long range attempts.

But most of all, it was The Drog Show on display at the Stamford Bridge. I am among the people who have voiced for Drogba to be replaced by Torres in the starting line up. But he proved yesterday night that Torres will always find it difficult to be the automatic choice. His strength, aerial prowess and the ability to hold up play was what got us through that night. In times when defending desperately, you could just lop the ball to this man and he’ll take care of the rest.

Yes, it was the experience and not the youth that got us through. It was the will to prove themselves that got us through. People have been talking a lot about a subdued Stamford Bridge and a fortress that once was and can never be again – it was the need to silence them that got us through.

But this was so uncharacteristic of AVB. At the end one can argue that the strategy was effective,  but would I want my team to play like this every match? Definitely no!

AVB was brought to transform the style of our play. He wants more ball retention and higher tempo. Chelsea has found it difficult to adjust to these new demands. But you have to go through a painful learning curve. Dumping one philosophy and adopting another is not an easy task as AVB must have realized. Yet one must not give up.

AVB is young and this is his first big assignment. He is also learning. The positive I can take out of the match is that he can have two styles of play – the attacking and the defensive one. Quite often this season we have given away last minute goals. This is because we always stick to the high line of defense – something our defenders are not super comfortable with. Also since we want more ball retention the defenders, when challenged by the other team, try to play the ball to one another or a midfielder instead of just kicking it out of play. Luiz being more comfortable with the ball is able to do this, though he over does it. The others are still learning.

What we can do is to attack and get a bit defensive towards the end of the game when playing a tough opposition – when playing against Manchester City and Spurs for example. As seen yesterday, Terry and co. are very comfortable sitting deep and defending as if their life is at stake. But when we play lesser opponents, I want us to attack all the time. Maintain the high line, press a lot and convert shots on goals. With time we can completely transition to the more attractive style.

There have been lot of rumors in the papers lately. But I want Lampard, Terry and Drogba to see off their playing career with us. They’ve given so much to the team. They were the first revolution. Let’s see what the future holds for them.

Popularity: 1% [?]