Tuesday, December 13, 2011

Real Java Geeks


Code hard! And get out of your cubicles! Video created for the Community Keynote at JavaOne Brasil.

Monday, December 12, 2011

Create intro flash / page in Joomla

Recently I am doing a website in joomla and I wanted to have an intro page for it. By default, there is no facility for it in joomla by default. Dont worry. Create an index.html file and put in the root directory. It will first take up that html file and you have successfully created an intro page. On this intro page provide a link to index.php file and you just entered into your joomla site. What if your hosting takes index.php as default? Then create .htaccess file and add following line in it:
       DirectoryIndex index.html index.php
This tells apache to load index.html as default page. replace index.html with your intro filename. Another option is to install joomla inside sub-directory and put intro file outside joomla directory and point index.php inside that sub directory.

Reset Apache2 on Ubuntu

Recently I was experimenting on apache2 and edited many config files. Soon I realised that PHP was not working properly on it. While installing joomla it was failing. So I removed apache2 using command:
     sudo apt-get purge apache2 
The problem was I didnt removed apache2 completely. Then I quicked googled and find out the correct way of getting it working back use following snippet.
APACHE_PKGS=`sudo dpkg --get-selections | grep apache | cut -f 1`
# Make sure things are sane:
echo $APACHE_PKGS
# Example output: apache2 apache2-mpm-prefork apache2-utils apache2.2-common \
# libapache2-mod-php5 libapache2-mod-python libapache2-svn
# Likely if you have a Python application:
# libapache2-mod-python libapache2-mod-python-doc libapache2-mod-wsgi
# Or if you roll with the PHP:
# libapache2-mod-php5
sudo apt-get remove --purge $APACHE_PKGS
# You might want to consider not re-installing the whole list;
# instead dump it out, audit, and install what you need:
sudo apt-get install $APACHE_PKGS
After this apache2 got resetted and working as it was freshly installed with all configurations replaced.
Reference : http://bit.ly/uBxq7L