Resuming Failed Download Using RSYNC


Situation : 
I have to download some big file from your server. but I don't have access to login in server system.
But using VPN you are able to downlaod some big file.

I tried downloading the big file from the server.
#wget http://10.0.0.1/mypath/mybigfile /root/myfiles/mybigfile
But most of the time the download was not completing, and If I try it using rsync it will ask for password which I was not having, so con't download using rysnc.
So I had to restart it from the beginning (and most probably it fails again, because of some n/w issue)

But now I am able to resume the failed download and continue my task.

Here are the steps
We have other system (say 10.0.0.2) which is local to server and I have credentials for that system.
So first of all I login to 10.0.0.2 and download the bigfile there
#wget http://10.0.0.1/mypath/mybigfile /root/workspace/mybigfile
As the system is local to server, downloading the file there is fast, it takes less than 1 minute.

So afer downloading the file on 10.0.0.2, I resume it using rsync.
rsync --rsync-path=/usr/bin/rsync --partial --progress --rsh=ssh root@10.0.0.2:/root/workspace/mybigfile /root/myfiles/mybigfile
It will ask for the password, supply it, and the downlaod will resume

Project Lombok for Java


Project Lombok is a very good for keeping your class clean.
Use Annotation for most of the common things like getter/setter, equals, hashCode, toString etc.
If you gonna start a project from scratch, just give it a try.
learn more at Lombok Features
Watch video

Create a Bootable USB (Windows Vista/7)


Open a command prompt with administrator rights and enter the following sequence of commands:
   diskpart
   list disk
   select disk {number}
   clean
   create partition primary
   select partition 1
   active
   f
ormat fs=fat32 quick
   assign
   exit
In the "select disk" command, replace {number} with the drive number of your USB drive as indicated when you ran the "list disk" command. Check and double check you choose the correct number since this procedure erases everything on the drive you select.
Or download UNetbootin

Compressing with 7z

7z is very much useful in compressing large data.

Install 
yum install p7zip.x86_64 p7zip-plugins.x86_64

Compressing
7za a -t7z -mx9 compressed.7z files_to_compress
(-mx9 maximum compression)

Uncompressing
7z x compressed.7z dest_dir/

SVN Checksum Problem


If you are getting svn checksum error backup your changes and in case you are using SVN 1.7+ there is a workaround described
Just to recap:
  1. Go to the folder with the file causing problems
  2. Execute command svn update --set-depth empty
  3. Execute command svn update --set-depth infinity

How to recover the mysql root password ?


First stop the mysql service and Start to MySQL server without  password using this command 
# mysqld_safe --skip-grant-tables 
& Connect to mysql server using mysql client:
# mysql -u root and use below commands
mysql> use mysql;
mysql> update user set password=PASSWORD("NEW-ROOT-PASSWORD") where User='root';
mysql> flush privileges;
mysql> quit

Maximum Utilities a single place : Win 7

Make any folder and rename it with
somwname.{ED7BA470-8E54-465E-825C-99712043E01C} 
and open it