Defension is down

Defensio

Defensio has been down since yesterday.

Defensio Down

My spam aren’t being filtered, I can’t access my Defensio quarantine page and users are unable to post new comments.

Their hosting provider Amazon (EC2) push some software which caused Defensio’s services to go down. The team’s currently working on the issue and updated can be tracked through their blog and twitter.

Fuel price hike in Malaysia

It’s RUMORED that the new fuel price in Malaysia effective midnight today will be raised from RM1.92 to RM2.70. That’s a 78 cents hike which adds up to about 40%. My Wira gonna cost me about RM110 for a full tank.

Looks like the petrol pumps around town are gonna be filled up today.

You endorse the hike? I do, time to think green I would say.

How to send a process to the background

Sending a process to the background in Linux is quite easy. All you need is bg, fg, &, and ctrl+Z ( ^Z ).

For this example I will use a simple bash script test.sh I put together to print “Test” every 5 seconds.

#!/bin/bash
#This script will print "Test" every 5 seconds
#
while [ true ]
do
echo "Test at `date`"
sleep 5
done
#End

Now let’s see how it’s done.

[user@abubu root]$./test.sh &
This starts test.sh and sends it to the background. You will be back at shell but should see the “Test” message every 5 seconds.

[user@abubu root]$jobs
[1]+ Running ./test.sh &

The jobs command will print all the background processes. Each process is represented by a number to it’s left. For example, tesh.sh is represented by 1.

[user@abubu root]$fg 1
The fg command will send the test.sh process to the foreground and return control to the shell.

[user@abubu root]$ ./test.sh (hit ctrl+Z (^Z) now)
Test at Tue Jun 3 15:11:38 MYT 2008
[1]+ Stopped ./test.sh

The test.sh process is temporarily suspended.

[user@abubu root]$bg 1
The bg command will send test.sh to the background.

[user@abubu root]jobs
[1]+ Running ./test.sh &

The jobs command will print all the background processes. Each process will be represented by a number to it’s left. tesh.sh is represented by 1.

[user@abubu root]$fg 1
The fg command will send the test.sh process to the foreground and return control to the shell.

That’s it.

How to disable directory listing in Tomcat

tomcat

This is how you turn off directory list for yr Tomcat server.

1. Edit the default servlet in the {$CATALINA_HOME}/conf/web.xml file.

2. Look for the <init-param> section within the <servlet section>

<servlet>
<servlet-name>default</servlet-name>
<servlet-class>
org.apache.catalina.servlets.DefaultServlet
</servlet-class>
<init-param>
<param-name>debug</param-name>
<param-value>0</param-value>
</init-param>
<init-param>
<param-name>listings</param-name>
<param-value>true</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>

3. Change the <param-value> to false for the <param-name>listing</param-name> section.

<init-param>
<param-name>listings</param-name>
<param-value>false</param-value>
</init-param>

Web Application Frameworks

[poll id=”3″]

Do you develop using web application frameworks?

I like the idea of using frameworks to develop. I’ve played around with Ruby On Rails, Symphony, Django and a few others. They generally help simplify code.

For example, I don’t waste time on my db connection , presentation layer, form validation codes anymore and I get to spend more time on the functionality of my applications instead.

Frameworks also help cut down your development time. Handy when slapped with ridiculas project time lines. Go through the Ruby On Rails demos and you’ll see.

Here’s a list of web application frameworks widely used today and their features comparison.

© 2008-2012 The Danesh Project
Powered by Wordpress and made by Guerrilla. Hosted at ServerFreak