Milliseconds since epoch

Here is website gives handy tool to get milliseconds since epoch which I find it very handy.


Screenshot highlighted with features –


Create new user in unix with root permissions

1. Add new user

root@0d9d9ddf04bb:~# useradd anil

2. set password

root@0d9d9ddf04bb:~# passwd anil
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully

3. Tye sudo visudo, add below entry at the end


Imagination vs Knowledge

Knowledge is limited
Imagination is unlimited

Knowledge takes you from A to B
Imagination takes you everywhere

I’m enough of an artist to draw freely on my imagination, which I think is more important than knowledge. Knowledge is limited. Imagination encircles the world. –Albert Einstein


Mac Tricks: Opening hidden directory in Finder

I had this requirement all the time to navigate through ~/.m2 directory from Finder – I found below step is very easy to open hidden directory from finder – 

1) Go to Terminal

2) open ~/.m2

That’s it.

Back with new blog

Back with new blog. 🙂

On Struts 2

I was just browsing through to find out new developments in Struts 2 and found the following are is nice articles on Struts 2.

Summary of points:
– Dispatcher has been changed from servlet to filter
– Action class is not singleton. So no thread-safety issues for Action class
– Action class can be a simple POJO with a signature public String methodName()
– No tight coupling to container in Action class code.
– Injected dependencies with DI/IoC
– Concept of Interceptors
– Simplified Unit testing of action classes

Spring’s IoC

Spring Framwork is promoting loose coupling through a inversion of control (IoC). A powerful idea. When IoC is applied, objects are passively given their dependencies instead of creating or looking for dependent objects for themselves. This defers the architectural decisions to be taken at later point of time. In other terms, my class need not know what kind of implementation being injected by framework. The injected object can be remote object or local object. It could be a web service, EJB or an RMI object.