Thursday, June 26, 2008

call second from first

Invoke other one command(shell) file from first.

--- first.sh---
#!/bin/sh
./second.sh $@
----------------

--- first.bat ---
@echo off
call second.bat %1 %2 %3 %4 %5
----------------

Friday, June 20, 2008

Remote debugging Tomcat with Eclipse

1. Конфа для старта сервака

Для Linux

Для Tomkat'a изменяем скрипт запуска eXo.sh (для других сервакох делается аналогично)

Закомментируем ненужное:

#JPDA_TRANSPORT=dt_socket
#JPDA_ADDRESS=8000
#REMOTE_DEBUG="-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n"

Главное прописать вот эту строчку:

JPDA_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=y"

Добавляем эти опции в конец джава параметров запуска:

JAVA_OPTS="$YOURKIT_PROFILE_OPTION $JAVA_OPTS $LOG_OPTS $SECURITY_OPTS $EXO_OPTS $EXO_CONFIG_OPTS $JPDA_OPTS"

exec catalina.sh "$@"


Для Windows

Для Tomkat'a изменяем скрипт запуска eXo.bat (для других сервакох делается аналогично)

Главное прописать вот это:
set JPDA_TRANSPORT=dt_socket
set JPDA_ADDRESS=8000
set JPDA_SUSPEND=y
set JPDA_OPTS=-Xdebug -Xrunjdwp:transport=%JPDA_TRANSPORT%,address=%JPDA_ADDRESS%,server=y,suspend=%JPDA_SUSPEND%

call catalina.bat %*

2. Старт сервака


Для Linux:
./eXo.sh run

Для Windows:
./eXo.bat jpda run


Если все ок, то увидете приглашение для старта дебага:
"Listening for transport dt_socket at address: 8000"

3. Запуск дебага в Eclipse



Monday, June 16, 2008

Bike in Paris

В центре Парижа под Эйфелевой башней!Много людей ездят на велосипедах по-делам.

Их можно брать на прокат. Для жителей абонемент стоит 20 евро в год. При этом можно брать его на пол часа, потом поставить и взять другой. Иначе прийдется заплатить 1 евро. Если не поставишь через сутки то прийдется заплатить 150 евро.

Лувр.

Thursday, June 12, 2008

Maven war plugin classpath and play around manifest

http://maven.apache.org/plugins/maven-war-plugin/examples/war-manifest-guide.html

Maven 2 build Lifecycle Phases

There are options for dependencies

1. The "optional" tag is "true"
goes in manifest classpath, but not included in WEB-INF/lib

2. The "scope" tag is "provided"
excluded from manifest classpath, and excluded from WEB-INF/lib

For plugin maven-war-plugin we can add options to exclude all dependencies in manifest.


configuration
archive
manifest
addClasspath false /addClasspath


How can we exclude a list of dependencies from MANIFEST file with some option for plugin configuration?
E.g.:

configuration
excludeProjects
junit, jmock, bcel, ehcache, xercesImpl
/excludeProjects
includeToWarClasspath/
/configuration

Ubuntu on usb stick with jdk

Installation 7.10 close to:
1. ubuntu-804-usb-hard-drive-install
(instructions more close to this one, but this version doesn't work - desktop doesn't appears)
2. ubuntu-704-to-a-usb-hard-drive
(pure documented instructions, and I didn't try this one due to old release date)

Than edit grub (without this step usb stick doesn't boot ubuntu, just grub menu appears on athescreen)
"sudo gedit /boot/grub/menu.lst"
remove all added at bottom from hard disk grub
and rename "hd1" for flash grub with "hd0"
You can edit this on fly in a loaded grub menu with "e" and boot edited with "b".

Run boot from USB storage.

After, you can comment swap space within /etc/fstab or exclude it while installation with manual prepare disk space. It makes faster your system.
"sudo gedit /etc/fstab"

Add network settings, sources of packages.
Install mc, jdk.

Copy tomcat.

PS:
0.
I used CD burned ubuntu 7.10 for i386 on my USB 4Gb OCZ ATV flash drive with Dell AMD 2x1.8 Ghz and 2Gb memory laptop.

1.
grub-error-21-after-full-install-to-usb-hard-drive
sudo grub
grub> find /boot/grub/stage1
(hdx,y) The given out values substitute below
grub> root (hdx,y)
grub> setup (hdx)
2.
You can create live usb stick (it is more faster than full process installation on USB), but there are error with install jdk.
usb-ubuntu-804-persistent-install-via-the-live-cd

Link:
www.stonewarewebos.com - webOS-Ubuntu-PressRelease.pdf
http://www.pendrivelinux.com/2008/05/08/usb-ubuntu-804-persistent-install-via-the-live-cd/

Tuesday, June 3, 2008

SVN in command line helps you

Are there conflicted?
svn st * | grep "C "

Are there unversioned?
svn st * | grep "? "

Are there modified?
svn st * | grep "M "

Are there unversioned but not mine generated?
svn st * | grep "? " | grep -v "target" | grep -v ".classpath" | grep -v ".settings" | grep -v ".project"

How to remove that files which are results of search?
| xargs rm -rf

Monday, June 2, 2008

Paris















Sochi







Sunday, June 1, 2008

Bike - picture in details

Krasnodar