Hussain Fakhruddin
  • Blog
  • About

Setting Up JAVA_HOME on Linux

By hussainanjar On September 25, 2012 · Leave a Comment

1. To set the environment variables:

echo ‘export JAVA_HOME=/usr/java/jdk1.6.0_21′ > /etc/profile.d/jdk.sh echo ‘export PATH=$JAVA_HOME/bin:$PATH’ >> /etc/profile.d/jdk.sh

2. You have to source the file you just created by typing:

source /etc/profile.d/jdk.sh

3. Test if Java environment is successfully installed by typing in this in the shell:

$ java -version java version “1.6.0_03″ Java(TM) SE Runtime Environment [...]

Continue Reading →

Setting up a GitHub subdomain

By hussainanjar On February 17, 2012 · 2 Comments

Setting up a GitHub subdomain to host your html website is very simple.

Start with creating a new repository on GitHub with the project name as yourusername.github.com.

Once you have created the repository you need to set it up on your local machine and push a master branch with index.html file. Follow the [...]

Continue Reading →

Personal Finance app on cloud foundry using grails

By hussainanjar On February 12, 2012 · 9 Comments

Personal Finance app is developed using Grails 2.0 and is running on cloud foundry. http://personalfinance.cloudfoundry.com/

This app makes use of following grails plugins.

jquery 1.7.1 (Grails 2.0 built-in plugin) resources 1.1.6 (Grails 2.0 built-in plugin) cached-resources 1.0 zipped-resources 1.0 yui-minify-resources 0.1.4 shiro 1.1.3 cloud-foundry 1.2.1 twitter-bootstarp 2.0.0.16 (Not using it [...]

Continue Reading →

Reinitializing jquery event on ajax response

By hussainanjar On January 31, 2012 · Leave a Comment

I had a jquery change event attached to a checkbox which was part of a div.

<div id="test-div"> <input type="checkbox" checked="checked" value="1" class="test-chkbox" /> </div>

Using the following jquery code a change event was attached to the above checkbox

$(".test-chkbox").change(function () { $.ajax({ type: "GET", url: "some-action", data: this.value, cache: false, success: function(response){ $("#test-div").replaceWith(response); } [...]

Continue Reading →

Basic Usage of VIM Editor

By hussainanjar On October 30, 2011 · 1 Comment

In this blog we are going to discuss very basic usage of VIM editor.

What is VIM

Vim is an advanced text editor that seeks to provide the power of the de-facto Unix editor ‘VI’, in short VIM is an improved version of VI text editor.

Modes in VIM

VIM has six different modes, you [...]

Continue Reading →

Mysql – Resetting root password

By hussainanjar On October 28, 2011 · 2 Comments

Once in a while you want to reset your mysql root password, here is how you can do it.

Stop the MySql service

sudo /etc/init.d/mysql stop

Restart MySql in safe mode and skip grant table so that you can login with root without any password.

sudo mysqld_safe –skip-grant-tables &

Login with root

mysql -u root

[...]

Continue Reading →

Grails: Cloud Foundry cheat sheet

By hussainanjar On October 16, 2011 · 5 Comments

This blog is a cheat sheet for using Cloud Foundry grails plugin. For details about the commands and how to install plugin please look at the guide.

Deploying Application Initial state

grails cf-apps – list of active deployed applications
grails cf-info – Details about resources in use (Memory, Services [...]

Continue Reading →

Basic MySQL Configuration Parameters

By hussainanjar On October 15, 2011 · Leave a Comment

Here we are going to discuss some basic MySQL configuration parameter for tuning MySql

max_connection=50
max_connection defines the maximum number of simultaneous client connections. Default value is set to 100, you can start with a low value like 20 or 50 and increase them as your application grows.

table_cache=2048
table_cache determines how many [...]

Continue Reading →

Grails: using span instead of list for renderErros tag

By hussainanjar On October 6, 2011 · 3 Comments

By default renderErrors tag in grails supports list or xml to display errors, but if we want to display error next to the field as shown below then list is not the best way to go.

So to resolve this issue I extended the current grails ValidationTagLib and override the tag renderErrors to [...]

Continue Reading →

MySql Tuning with indexes

By hussainanjar On April 30, 2011 · 2 Comments

This blogs explains how you can improve the performance of your select queries by properly using indexes.

Consider the following query on a data base with no indexes.

select ci.Name, co.Name, cl.Language from city ci, country co, countrylanguage cl where ci.CountryCode=co.Code and cl.CountryCode=co.code and ci.CountryCode = ‘USA’;

Lets do an explain on the above query.

[...]

Continue Reading →
← Previous Entries
  • Categories

    • GitHub (1)
    • Grails (3)
    • jQuery (1)
    • Linux (4)
    • MySql (3)
"@varunmaggo future is quite bright for grails, which contenders are you talking about ?" — hussainanjar

Hussain Fakhruddin

Pages

  • Blog
  • About

The Latest

  • Setting Up JAVA_HOME on Linux
    1. To set the environment variables: echo 'export JAVA_HOME=/usr/java/jdk1.6.0_21' > /etc/profile.d/jdk.sh echo […]

More

Thanks for dropping by! Feel free to join the discussion by leaving comments, and stay updated by subscribing to the RSS feed.
© 2012 Hussain Fakhruddin
Platform by PageLines