rsync ssh custom port



rsync -avz -e "ssh -p $PORT" user@remoteip:/path/to/files/ /local/path/

Alternative Truecrypt "CipherShed"

https://ciphershed.org/



 credit : Hacking & Security Book

[Facebook Trick] Find some friends of hidden friend list

Today i founded the trick to find some friend on friend list ("Only Me" Privacy setting friend list).

Facebook concern people can see your friendship on another timeline
The trick use Facebook Friend Suggestion feature to find some friend of victim.

Instruction:

1. Register new Facebook user

2. Find the victim who want to know (Victim user need "Everyone" can send friend request on their privacy setting)

3. Use New Facebook user send friend request to victim and then cancel it.

4. go to : https://mbasic.facebook.com/friends/center/suggestions

5. you will get some friend of the victim






P.S. i wrote simple php script to fetch some friend of victim here


P.S. i reported to facebook security team but they reply this is not a bug



Ubuntu Virtualbox Cannot register the hard disk fixed

i found this problem after upgrade from Ubuntu 12.04 to 14.04. the problem is  cannot register the hard disk UUID because UUID already exists.



We need to change hard disk uuid from command line

vboxmanage internalcommands sethduuid vmimage.vdi


After change hard disk UUID, We need to add vm image to Virtualbox





Done. Happy!!!

Java Android Pause / Resume Thread

This example from stackoverflow. Thank You Wroclai


class YourRunnable implements Runnable {
    private Object mPauseLock;
    private boolean mPaused;
    private boolean mFinished;

    public YourRunnable() {
        mPauseLock = new Object();
        mPaused = false;
        mFinished = false;
    }

    public void run() {
        while (!mFinished) {
            // Do stuff.

            synchronized (mPauseLock) {
                while (mPaused) {
                    try {
                        mPauseLock.wait();
                    } catch (InterruptedException e) {
                    }
                }
            }
        }
    }

    /**
     * Call this on pause.
     */
    public void onPause() {
        synchronized (mPauseLock) {
            mPaused = true;
        }
    }

    /**
     * Call this on resume.
     */
    public void onResume() {
        synchronized (mPauseLock) {
            mPaused = false;
            mPauseLock.notifyAll();
        }
    }

}

How to fix Ubuntu 14.014 ctrl+space do not work

After i updated my ubuntu from 12.04 to 14.04. i founded problem ctrl+space key shortcut for code assist not work in Eclipse and Netbeans again. This is the solution to fix it.

1. Open Terminal run this command

ibus-setup

2. On next input method, delete ctrl+space



3. After deleted, Ctrl + Space will working fine!!!! Happy!!!

PHP-FPM vs HHVM

this is result i tested concurence between php-fpm (tcp) vs hhvm (tcp)

My http server is Nginx. i tested 1000 requests and 50 concurrence.


First i tested php-fpm the time taken for test is 8.272 seconds.

php-fpm result

i tested hhvm the time taken for test is  2.831 seconds

hhvm result
the code that i tested is my project based on cakephp framework.

conclusion hhvm is very very fast but hhvm is not support unix socket now. :-(