Friday, August 14, 2009

xSocket

xSocket
xSocket is an easy to use NIO-based library to build high performance, scalable network applications. It supports writing client-side applications as well as server-side applications in an intuitive way. Issues like low level NIO selector programming, connection pool management, connection timeout detection are encapsulated by xSocket.

With xSocket you are able to write high performance, scalable client and server components such as SMTP Server, proxies or client and server components which are based on a custom protocol.

Wednesday, August 12, 2009

Anonymous inner class code

try {
final Socket conn = socket.accept();
exec.execute(new Runnable() {
public void run() { handleRequest(conn); }
});
}

Tuesday, August 11, 2009

LSOF

LSOF

Are the Glory Days Long Gone for I.T.?

Are the Glory Days Long Gone for I.T.?

SSH Key One-Liner

If you have to manage a lot of servers or run remote scripts in cron, SSH keys are a lifesaver. It’s so nice to be able to ssh to a machine and instantly log in
without typing a password. Of course, one of the more annoying parts of the process can be setting up the SSH keys on the remote host. Typically, the
process goes something like this:
run ssh-keygen locally,
scp the ~/.ssh/id_rsa.pub to the remote server,
then ssh to the remote server and
append that key to your remote ~/.ssh/authorized_keys file.

The above method works, but if you can do the entire thing with a one-liner, why wouldn’t you?
Here’s the SSH one-liner that will copy your local SSH key to the remote host, so you have to type the password only once in the whole process:
$ ssh user@server.example.net "cat >> ~/.ssh/authorized_keys" < ~/.ssh/id_rsa.pub

Friday, August 7, 2009

Oracle queries

Select last 10 inserted records
Select * from emp where rownum < 11

Thursday, August 6, 2009

Few things are impossible to diligence and skill. Great works are performed not by strength, but perseverance.

Few things are impossible to diligence and skill. Great works are performed not by strength, but perseverance.