Mindtree buyback

Following TCS, Mphasis now Mindtree is coming up with the shares buyback plan. Though at this point it is very uncertain to list out the details, yet it should be kept in mind if you are a retail share holder.

If you are aware of buyback process then following detail is of relevant to you:

  1. Price of mindtree share as on 22nd June 2017 is 520 INR.
  2. The buyback price is likely to be +15% of current price i.e. 600 INR. If the board is generous, it could even be at its 52 weeks high i.e. 680 INR.
  3. As on March 2017 Quarter, there are 89139 people, holding 1,35,80,985 shares which is roughly 8.08 %. This is on contrast with TCS (~3% retail share holding) and Mphasis (~2.35%)
  4. There was 100% acceptance ratio for TCS and Mphasis, which may not come true for Mindtree since there is retail shareholder percentage is higher.
  5. The board is likely to announce the details on 28th June when the actual numbers will come out and this thread will be updated as well.

Verdict: This may result in small term gain of  ~10% even before the numbers are announced and the buyback process starts. So you can start accumulating at current levels.

More update to follow.

Setting maven alternative local repo

Alternate local repository: a repository which looks like your local repo but is read only. So it is kind of global repository e.g. repo.maven.apache.org or your organization hosted repository (which you can read-only), but resides either on network or on your computer only.

I came across many use cases when an alternate local repo can help in building the project in super fast manner. I will list out the benefits here:

  1. You may be moving to another branch of the project: You may start from scratch where the local repository will be created and populated by fetching the artifact from remote repository. But if you have existing repository for different branch of the project, it may have many artifacts which were unchanged for across the project. So you may want to use that repository as alternate local repo, so that the requests of artifacts could be satisfied locally and you can build the project in faster manner.
  2. NFS mounted repository: It is possible that you have built the project in one machine A (say windows) but now want to build on linux machine B, so not instead of fetching the artifacts from remote repo, you can mount box A as nfs mounted disk on another machine B and use the local repo of A as the alternate repo of B. Since the artifacts will be present in machine A, the build time will be lesser.
  3. Reproducing issue on build machine: It is possible that you are building on build machine which is not owned by you. Since it is a build machine, artifacts are very likely to be there.
  4. You are on ancient build but want to clean up:
  5. You want to clean up your local repo in smart manner:
  6. You may want to share your repo with a colleague who is on old build and co-incidently you have the repo for it.

I am sure there would be many reasons of having alternate repo.

So here is the way. I modified the code of SimpleLocalRepositoryManager.java which exists inside aether project of maven.

I have done changes in aether-1.0.2.v20150114.




Once you have configured above jar in the maven lib directory, all you need to set NETWORKREPO environment variable for example

export NETWORKREPO=/data1/builds/repo/oldBackup (in unix)


set NETWORKREPO=c:\repo\oldBackup (in windows)

where oldBackup is the network local repository (will be treated as read-only).

You can also mount network shared directory in your machine and use that by setting it as NETWORKREPO.


Serial console: ssh host key verification failed

Recently I encountered a problem of ‘host key verification failed’ when I was trying to connect to host while being on the serial console.

debug mode says ‘/dev/tty’ does not exists, while it does.

but problem is : you are on serial console which is /dev/ttyS0 not /dev/tty, so now you can guess what to do :

create a symlink of /dev/ttyS0 to /dev/tty

ln -s /dev/ttyS0 /dev/tty

it’s done.

or setup password less remote login.


ssh/scp : effect of compression

*** on fast network palasi to my pc(located in philips lab)

without compression
real    0m23.403s
user    0m8.513s
sys    0m3.612s

with compression and using blowfish
-C -c blowfish
it give worsen performance

*** hope we can expect something on dialup network : hackyourworld.org to my pc ( connected through mobile connection dial-up)
with compression && blowfish : copying around 1 mb data ( having many small small files )
real    1m34.509s
user    0m0.048s
sys    0m0.036s

without compression && blowfish
real    2m59.136s
user    0m0.048s
sys    0m0.044s

–> Compression won 🙂

*** compression at server then copying then decompress
copying the same data which is in compressed file ( facing stalls )
real    2m4.427s
user    0m0.052s
sys    0m0.008s
took much time than above.

*** under wireless connection of IITD_WIFI1
!compression && !blowfish
real    0m35.653s
user    0m0.040s
sys        0m0.052s

!compression && blowfish
real    0m35.613s
user    0m0.052s
sys        0m0.040s

compression && blowfish
real    0m30.188s
user    0m0.036s
sys        0m0.048s

already compressed
compression && !blowfish
real    0m5.796s
user    0m0.040s
sys        0m0.012s

compression && blowfish
real    0m5.796s
user    0m0.040s
sys        0m0.012s
blowfish && compression
real    0m8.536s
user    0m0.056s
sys        0m0.012s

Conclusion : On Slow connection, but always alive ( doesn’t get stalled in between ), using compression is better. BTW You don’t loose due to compression, so
alias scp=’scp -C’ ( it’s either better or same 🙂 ).

Connecting qemu guest to real network using bridge

There are literally dozen or more methods available on the internet for bridging qemu guest to the real network.
But sadly, most of them are too complicated or too stupid to work.
Below are simple steps for bridging a qemu guest to the host network.
  1. Release ip address on the host (dhcpcd -k eth0)
  2. Make sure eth0 is refreshed (ip link set eth0 down) (ip link set eth0 up)
  3. Create a bridge (brctl addbr bridge)
  4. Connect eth0 to bridge (brctl addif bridge eth0)
  5. Start ip-stack on bridge. (dhcpcd -n bridge)

Now, when qemu uses tap device, we should attach this device to bridge.
Add this line to /etc/qemu-ifup
brctl addif bridge $1
Here $1 is the name of the tap device that qemu uses for guest

When the guest is powered off, qemu should remove the interface of tap device from bridge.
Add this line to /etc/qemu-ifdown
brctl delif bridge $1

For connecting qemu guest to the bridge, just tell qemu to configure guest’s network using the tap device.
sudo qemu-system-i386 -enable-kvm -net tap,vlan=0,ifname=tap0 -net nic,vlan=0 -hda ~/Data/OS_DiskImages/ubuntu11.10/disk.qcow2

Here  is a link to all the three scripts.

  1. Starting bridge
  2. qemu-ifup script
  3. qemu-ifdown script

Proxy Sharing Using SSH Tunelling

Many a times, we are working on internet behind a proxy server and have download limit that expires faster than we expect/want it to.
Students generally resort to sharing proxy passwords among themselves. While this is ok, it creates a lot of security and other problems.
Here is a way for a student to access another’s proxy without sharing the password.

Consider a scenario where personA is connected to proxy and personB wants to connect to it using personA’s connection.
Since A is logged into the proxy, http, https, ftp and socks connection to proxy-server must be available on local port.
We will consider a scenario for http_proxy of IIT Delhi.
The proxy-server’s ip is and the http_proxy is available on port 3128.  Lets call them proxy_server and http_port respectively

At A :

  1.   Connect to Proxy

At B:

  1. ssh -L $my_http_port:$proxy_server:$http_port userA@userA_IP
  2. Cool. Proxy tunnel has been setup for http.
  3. Point your firefox to use the port $my_http_port on localhost for http_proxy.

You are done.
The funda behind this is :
At B, you are mapping a localport 19000(any unused port should work) to point to’s (proxy ip) 3128 port (http) using userA@userA_IP as an intermediate.

Using multiple versions of gcc at the same time

Chances are that many programs compiled for gcc 4.6 may not work for gcc 4.7.
Hence you must keep both and at the same time make the link to gcc4.7 vary according to the situation.
You can edit your gcc file to be a shell script :

if [ -n "$GCC_SIX" ]; 
  exec /usr/bin /gcc-4.6 "$@"
  exec /usr/bin/gcc-4.7 "$@"
fiNow, whenever you find a program not working on gcc4.7 
just set an environment variable and you have switched to 

for the current execution. Notice that for a 
multi-user system, this can prove to be a life saver.