May 11 2009

What do you drive?

Category: Funny,TechnicalRpx @ 17:02


Apr 17 2009

Ce mai patenteaza Microshit…

Category: TechnicalRpx @ 12:49

…puteti citi aici.

Sincer, eu le-as fi recomandat cu caldura CTRL+ALT+DEL :)


Apr 17 2009

Peri albi si draci cu Jboss, Fedora Core 8, Ant si Eclipse

Category: TechnicalIuliana @ 12:39

La servici la instalarea masinii pe care urma sa lucrez la serviciu mi-am instalat ca bututilca jboss in usr. Avand in vedere ca mi-am facut partitia pe care se afla usr-ul de 15G la sfatul sysadminului, ca sunt slabe sansele sa am nevoie de mai mult si avand in vedere ca jboss scrie kile de loguri de care am nevoie, ma trezeam din cand in cand ca imi rage sistemul ca nu mai are spatiu.

Asa ca am mutat jboss-ul pe partitia de lucru, care are dimensiunea “imensa: de vreo 40g. Oricum e mai mult decat aia 15. La instalarea jboss este nevoie sa fie declarata o variabila de mediu numita JBOSS_HOME, care va contine calea catre directorul unde jboss este instalat. Acasa puneam respectiva variabila doar in /etc/profile. Si era de ajuns. La servici a trebuit sa o declar si in /etc/environment ca acolo trebuiau declarate toate variabilele de mediu necesare pentru functionarea corecta aplicatiei. De asemenea, la un moment dat cand tot nu mi-o vedea am pus-o si in ~/.bashrc.

Cand am schimbat locatia jboss-ului am modificat lejer doar in .bashrc. Asta a fost acum cateva luni bune. Totul a mers bine, pana la aparittia unul nou proiect in aplicatie. Acest proiect nu voia cu nici o culoare sa-si copie jarul rezultat in urma executiei task-ului ant respectiv in directorul de deploy al jboss-ului meu. Nu m-a deranjat nici asta, aplicatia mergea, de n-avea rost sa imi aprind paie in cap singura.

In Eclipse, un proiect folosea o clasa din respectivul jar, care nu era gasita din cauza ca nenorocitul de jar nu se updata. Si aveam in toata suita de proiecte o eroare, una singura. Avand in vedere ca foloseam taskuri ant pentru compilarea separata a proiectelor, iarasi… nu era o problema. Ceea ce ma deranja era faptul ca imi aparea acolo o linie de cod subliniata cu rosu si proiectul respectiv era decorat cu un insuportabil semn “X” rosu. Si azi am incercat sa-mi dau seama ce naiba se intampla.

In taskurile noastre ant calea catre directorul jboss este luata cu ${env.JBOSS_HOME}. Si desi am modificat nenorocita de cale peste tot, expresia aia returneaza inca valoarea veche sau cel putin asta o printeaza, ca de copiat jarurile se copie unde trebuie. Toate in afara de acela mentionat mai sus. Daca printam cu echo variabila respectiva si pe userul normal si pe root, valoarea respectiva era cea corecta.

Am dibuit-o pana la urma. Se pare ${env.JBOSS_HOME} ia valoarea din ~/.bash_profile a userului curent. Deci daca vreodata aveti probleme de genul acum stiti ce  fisier sa verificati din prima. Eu una stiu acum :).


Apr 08 2009

Conficker tip

Category: TechnicalRpx @ 10:32

Conficker (a.k.a. Downadup / Kido) este deja celebru. Acesta infecteaza computerele cu MS Windows care nu au un anumit update instalat, dupa care opreste serviciile de System restore, Automatic updates si Windows Defender. De asemenea, acesta omoara toate aplicatiile antimalware/antivirus de pe sistem si blocheaza accesul la site-urile ce contin unelte de dezinfectare. Acest lucru este efectuat prin blocarea serviciului DNS spre acele adrese, facand foarte grea dezinfectarea computerului.

Acest aspect poate fi ocolit prin folosirea unui proxy. Deoarece folosind un proxy, practic rezolvarea domeniului se face de catre acel proxy, Conficker nu poate bloca accesul la nici un site (cel putin, nu inca).

Prin urmare, pun la dispozitie un proxy public prin care se poate accesa site-ul http://www.bdtools.net unde se poate descarca o unealta de dezinfectare pentru Conficker.

Instructiuni pentru configurarea proxy-ului:

  • Pentru Internet Explorer: Alegeti optiunea Internet Options din meniul Tools. In noua fereastra, dati click pe eticheta Connections din lista de sus, apoi dati click pe butonul LAN settings. Bifati optiunea Use a proxy server for your LAN (partea de jos a ferestrei de dialog). Se vor activa cele doua campuri text. In campul Address introduceti 89.122.134.33 iar in campul Port introduceti 3128. Dati OK -> OK si apoi incercati sa accesati site-ul http://www.bdtools.net . Acolo veti gasi instructiuni detaliate pentru dezinfectarea computerului. Dupa descarcarea utilitarului, dezactivati proxy-ul prin aceeasi metoda, dar debifand optiunea Use a proxy server for your LAN.
  • Pentru Firefox: Din meniul Edit alegeti optiunea Preferences. Din lista de categorii, alegeti Advanced, apoi efectuati click pe butonul Settings… din zona Connection. Din noua fereastra de dialog, alegeti optiunea Manual proxy configuration. Se vor activa campurile text de mai jos. Introduceti in casuta de text HTTP Proxy adresa 89.122.134.33, iar in casuta de text  Port 3128. Inchideti ferestrele cu OK -> Close. Accesati site-ul http://www.bdtools.net si urmati instructiunile de acolo pentru descarcarea utilitarului de dezinfectare. Dupa aceasta, dezactivati proxy-ul prin aceeasi metoda, dar selectand No proxy (sau Direct connection to the internet in Firefox 2) in loc de Manual proxy configuration.

Proxy-ul nu permite decat accesul la site-ul http://www.bdtools.net . Pentru a putea viziona filmul de pe site ce descrie operatiunea de dezinfectie, va trebui sa dezactivati temporar proxy-ul dupa ce se incarca site-ul. Nu uitati sa-l reactivati daca vreti sa mai descarcati ceva de pe acel site!

Pentru cei ce se grabesc si stiu deja cum sta treaba, iata un link direct catre removal tool. Nu uitati sa activati proxy-ul in cazul in care Conficker blocheaza site-ul.


Mar 10 2009

Cross-compiling on Linux using Gentoo crossdev

Category: English posts,TechnicalRpx @ 22:38

Ever wanted to build your program for other architectures than the one on your system?

Maybe you wanted to build a piece of code for a 64bit system but don’t have a 64bit OS available? Or perhaps you want to compile some application for ARM to use on your mobile gadget? It’s all possible using Gentoo crossdev.

Gentoo crossdev will help you install a compiler, linker, runtime libraries and development tools for other architectures than the one native to your system. It does this by emerging the necessary packages in a separate overlay.

To start, emerge crossdev.

# emerge sys-devel/crossdev

Now, create the overlay for it.

# mkdir /usr/portage.crossdev
# echo PORTDIR_OVERLAY=\”/usr/portage.crossdev \$PORTDIR_OVERLAY\” >> /etc/make.conf

That’s all about configuration. It’s time to actually install the cross-compilers.

First, you should take a look at the help provided by crossdev. Issue crossdev –help and crossdev -t help.

Basicly, there are 2 commands which are of interest:

  • crossdev -t TARGET
  • crossdev -C TARGET

-t will install the specified target cross compiler, and -C will erase it.

Also, you can specify how deep the toolchain can go with -sn. The default will install a C compiler, the runtime libraries and a C++ compiler. (see –help).

crossdev -t help will show a comprehensive list of target choices, but I will describe the most usual ones for the average user.

# crossdev -t i686-pc-linux-gnu

installs the 32 bit tools for the PC architecture. Useful if you have a 64 bit system and want to compile for 32 bit without using the -m32 gcc hack.

# crossdev -t x86_64-pc-linux-gnu

install the 64 bit tools for the PC architecture. You can use this if you’ve got a 32 bit system and want to compile for 64 bit or want to test if your application is portable on 64 bit. Obviously, once built, you will not be able to run your application unless you move it on a 64 bit machine and operating system.

# crossdev -t i686-mingw32

installs the 32 bit windows toolchain. This toolchain will give you the ability to compile your application for use with Microsoft Windows. Includes the win32 specific headers and libraries (such as Winsock).

Amongst others, you can install toolchains for ARM, SPARC, Mips, PowerPC, HP-PA and ia64. It is great for checking if your application has any portability issues.

Once installed, the tools may be invoked at the user’s convenience. The format of the tool names is the as follows:

[target]-[tool]

where target is the one installed with crossdev (e.g x86_64-pc-linux-gnu or i686-mingw32) and tool is the tool name (e.g. gcc or ld). So in order to invoke the compiler for win32, we must run

$ i686-mingw32-gcc

And that’s all there is. :)

Note that if your application has dependencies that are not in the standard runtime library, those dependencies must also be compiled with the specific cross-compiler. For example, if your application links to the GTK+ library, GTK+ must also be compiled with that specific toolchain or you will encounter build problems.

If you want to test that everything is OK, here’s an example. It follows the i686-mingw32 approach.

After installing the i686-mingw32 toolchain, we’ll compile a short C program and try to run it with wine.

You can use this program. It’s not the omnipresent “Hello World!” example, but it demonstrates the point.

Save that piece of code as test.c. Next, invoke the builder.

$ i686-mingw32-gcc -o test.exe test.c

There should be no errors. Let’s test the file:

$ file test.exe
test.exe: MS-DOS executable PE  for MS Windows (console) Intel 80386 32-bit

Now let’s run it:

$ wine test.exe
a=10

Congratulations!

Remember! Your system is able to run only executables native to it. You need an emulator to run your cross-compiled applications (such as wine for windows targets), but that’s not always possible. For example, you will be able to compile a 64 bit application on a 32 bit system, but there is no way to run it on that system.


Mar 08 2009

Seaqxx’s laws

Category: English posts,MiscellaneousIuliana @ 0:35

In the same agenda I have found some rules which I tried to follow  while growing up.

  • Never ever fool around with the best friend of your girlfriend’s boyfriend.
  • Ideals usually stay buried in the heart, reality is  a different thing, no matter how hard it is. When ideals escape from the heart they make the dreamer a hero by killing him.
  • Try not to do things that you don’t enjoy at all. You will get it all wrong every time.
  • Females big absurdity is that they always love you when you have something else really important to do.
  • Males big absurdity is that they always have something else really important to do when you want them to love you.
  • A  battle on two fronts fought by one army is a lost battle unless the leader is Napoleon Bonaparte.
  • Never speak to a wide audience unless you are asked or you have something really important to say.
  • Choose wisely the moments when voice should be raised.
  • Don’t lower yourself to the level of someone intelligently inferior to you.
  • Hazard is very rare, but it is known to happen.


Mar 08 2009

Old days stuff

Category: English posts,MiscellaneousIuliana @ 0:03

I was making some cleaning today trying to decide what old stuff to throw out and I found a small agenda that I had been using for about 3 years, one of high school and two of faculty. Inside, among some of my favorite artists at the time autographs and a lot of stupid things, I found some quotes from a favorite writer of mine, named Liviu Rebreanu. So here they are.

  • Every man needs love and is worthy of it.
  • Love moves the sun… and the other stars.
  • Jealousy is born together with love.
  • In reality, nothing lasts forever.
  • Love never killed anyone, people have killed in its name.
  • Murder is always pregnant with punishment.
  • Love has filed for bankruptcy in this modern world, so did humility and respect.All is dominated by pride, vanity, selfishness, hypocrisy and chauvinism.
  • Hate is love’s sister, so it’s no shame to hate.
  • People with money escape any low, but this one.
  • I worth more than my reputation does.
  • True happiness lasts only a moment. Human nature cannot take more than that.