Thursday, February 26, 2009

Adding new file extension to NetBeans 6.5

If all you need is just add a new file Extension and associate it with a certain type of the file (e.g. PHP or C++), go to Tools->Options->Miscellaneous->Files
and add a new extension there, then select the appropriate type.
It's took me sometime to find out where this simple thing is hidden in NetBeans.

Sunday, February 22, 2009

Thunderbird and messages signatures

While working with Thunderbird, I have found a bug: whatever location you define for an identity signatures, they will be always located in the bottom of the replied / forwarded message.

Obviously, this is not convenient at all, but the solution is very simple: open Thunderbird menu
Tools --> Options --> Advanced Tab --> General, press "Config Editor..." button
In the long list which opens, find anything which starts from 'sig_bottom' (it will be one line per each identity you have defined) and double click these lines, thus replacing their values from 'false' to 'true'.

This solution was originally posted here and mentioned here

Thunderbird and Google Calendar

It is perfectly possible to configure Thuderbird 2.x to work with Google Calendar.
I had to install 2 Mozilla Thunderbird extension: Google Calendar Provider and Lightning (both of them are required).

Then go to Calendar view and select "Calendar-> New Calendar..."
It opens a wizard. Select there "On the Network" option, then select "CalDav" (second option) at the next screen and when you see "Location" field, which is the most tricky part of this setup,
insert there https://www.google.com/calendar/dav//events

More details are here, but actually the described is enough to get your remote Google calendar working in the Thunderbird

What's cool: you do not have to install Mozilla Sunbird to get this work!

Monday, February 02, 2009

Adding a new user to mySQL DB with phpMyAdmin

In addition to the graphical UI provided by phpMyAdmin, you can just issue the following SQL:
GRANT ALL ON DB-NAME.* TO IDENTIFIED BY '';

replace by teh user name you want, e.g. fernandotorres and replace by the password for this user. Note that there are ' signs around the password - keep them.

http://www.trap17.com/index.php/adding-users-databases-using-phpmyadmin_t31803.html

Apache with Virtual Hosts on Windows XP / XAMPP

I wanted my Apache / XAMPP to serve 3 different PHP projects / folders and my WinXP machine development machine.
I did following to allow that:

1. Add VirtualHosts - one for every root and add 'NameVirtualHost" directive. It is typically located in "extra\httpd-vhosts.confd" file. If you have your XAMPP in "C:\xampp", the path will be "C:\xampp\apache\conf\extra\httpd-vhosts.confd"

== httpd-vhosts.confd ===

NameVirtualHost 127.0.0.1


DocumentRoot "D:/xxx/yyy/zzz/prj1"
ServerName prj1



DocumentRoot "D:/xxx/yy/zzz/prj2"
ServerName prj2



DocumentRoot "D:/xxx/ttt/www/prj3"
ServerName prj3



2. Go to htppd.conf ( "C:\xampp\apache\conf\httpd.conf" in your XAMPP installation) and
verify that you hvae access permissions for every document root folder for prj1,2,3. Otherwwise
you end up with "Access Frobidden!" page.

=== httpd.conf ====


Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all


## The same "" definition should repeat for folder of prj2 and prj3


3. Go to Windows hosts file ("C\Windows\system32\drivers\etc\hosts" or similar) and add there new virtual hosts prj1,2,3, so you
can access them just by http://prj1 in your browser

=== hosts ===

127.0.0.1 prj1
127.0.0.1 prj2
127.0.0.1 prj3

4. Restart Apache and pint your browser to "prj1". You should be done now