Monday, April 13, 2015

tcp tunnel, old way but easy to use

iOS NSURLRequest does not have cookie info in the allhttpheaderfields api.
I am confused and I think I don't have cookie...but actually there is.
So to get the real sent request header, ether check nshttpcookie by yourself,
or simply use the tcp tunnel to dump the request.


java -classpath soap-2.3.jar org.apache.soap.util.net.TcpTunnelGui 8080 yourserver 8080

although soap is out, I still like this tiny tool. XD


Monday, February 2, 2015

[mongo] delete all data in database

mongo //will start the mongodb shell

show dbs //will list existing databases

use  // is the database you'd like to drop

db //should show  just to be sure I'm working with the right database

db.dropDatabase() //will delete the database and return { "dropped" : "", "ok" : 1 }