четвер, 21 квітня 2011 р.

Me learning Java.

Recently I've started learning some new webdev tricks in Java.
The guy in charge of Java competency group at Lohika — Zenyk Matchyshyn, has gave me a task
— to create a simple Ajax blog with REST API and JSON as data transfer format — and a set of technologies to use on that task: Maven2, Servlet API 2.5, Hibernate, Spring IoC.

Though I had some experience of using Hibernate and Spring container in some distant past, I was really impressed by Maven2.

So I've finished the task a while (about two or three months) ago

...and got a new one — do the same but using Spring MVC.

I've been trying to find some Maven2 project archetype for Spring MVC, but nothing good was out there, until Zenyk gave me a hint to dig into Spring Roo — which is another great tool from Java world I've got acquainted with.

Btw, if anyone needs to use an entity name that has a plural different than -s — use @RooPlural annotation, e.g.:

@RooPlural("BlogEntries")
class BlogEntry ...

So after two month of work I've finally got some time to get back to Java.
To be continued...

пʼятниця, 5 березня 2010 р.

Using monit to watch delayed_job on rails

I've been fighting for some time to successfully start/stop the delayed_job deamon ('daemons' gem) via monit from under another user and this is what I've ended up with:

check process delayed_job with pidfile /home/me/myapp/shared/pids/job_runner.pid
start program = "/usr/bin/env HOME=/home/me RAILS_ENV=staging /home/me/myapp/current/script/delayed_job start" as uid me and gid mygroup
stop program = "/usr/bin/env HOME=/home/me RAILS_ENV=staging /home/me/myapp/current/script/delayed_job stop" as uid me and gid mygroup

четвер, 11 лютого 2010 р.

bash_history

history | awk {'print $2'} | sort | uniq -c | sort -rn | head
59 sudo
58 ls
41 svn
23 cd
18 cap
17 pyramid_dir
16 rake
16 nano
14 rm
13 script/plugin