Ubuntu loves the installation packages packed in .deb format , however installing any .rpm packages is also quite easy using alien package

1. Install alien package

sudo apt-get install alien dpkg-dev debhelper build-essential

2. Convert .rpm to .deb using alien

sudo alien file.rpm

3. Install converted .deb package using update center / GDebi package installer

\"Confidence comes not from always being right but from not fearing to be wrong.\" - Peter T. Mcintyre
 

I never faced internet connection issues on ubuntu / linux, thanks to the Ndiswrapper / Additional driver of Ubuntu .

However some network hardwares like mine ( HP – Pavilion dv4 -1283cl ) require bit more work to bring up the internet connection.

1. First of all find the exact vendor name and model of your network hardware.

2. Search the vendor site to download the drivers for Linux incase exist else you need to manully build the wl.ko on your system and put it on the statup scripts.

X86 : Driver : https://docs.google.com/leaf?id=0B6gDoeCaurgfMWJjOWQ3OTktZDFiYS00NWM5LThiMzYtMzI5ZTlhNjY3MTE4&hl=en

X64 Driver : https://docs.google.com/leaf?id=0B6gDoeCaurgfYmVhMmMzYTUtMjMwOC00ZDBkLWFlNjgtNDhhNTgzZTQ2ZDVh&hl=en

For my laptop I’ve build the wl.ko file ( Ubuntu : 2.6.35-24-generic) :https://docs.google.com/leaf?id=0B6gDoeCaurgfMzVmY2RlMDMtZjA5NS00MTQxLThiMTQtMzhmY2EwOTJjYzkw&hl=en

Building wl.ko file:

s1. Download the Linux driver ( e.g for X86 OS : https://docs.google.com/leaf?id=0B6gDoeCaurgfMWJjOWQ3OTktZDFiYS00NWM5LThiMzYtMzI5ZTlhNjY3MTE4&hl=en )

2.

cd /home/abdul/

mkdir hybrid_wl

cd hybrid_wl

tar xzf <path>/hybrid-portsrc_x86-32_v5.100.82.38.tar.gz

3.

abdul@abdul-laptop:~/hybrid_wl$ make

KBUILD_NOPEDANTIC=1 make -C /lib/modules/`uname -r`/build M=`pwd`

make[1]: Entering directory `/usr/src/linux-headers-2.6.35-24-generic’

LD /home/abdul/hybrid_wl/built-in.o

CC [M] /home/abdul/hybrid_wl/src/shared/linux_osl.o

CC [M] /home/abdul/hybrid_wl/src/wl/sys/wl_linux.o

CC [M] /home/abdul/hybrid_wl/src/wl/sys/wl_iw.o

LD [M] /home/abdul/hybrid_wl/wl.o

Building modules, stage 2.

MODPOST 1 modules

WARNING: modpost: missing MODULE_LICENSE() in /home/abdul/hybrid_wl/wl.o

see include/linux/module.h for more information

CC /home/abdul/hybrid_wl/wl.mod.o

LD [M] /home/abdul/hybrid_wl/wl.ko

make[1]: Leaving directory `/usr/src/linux-headers-2.6.35-24-generic’

abdul@abdul-laptop:~/hybrid_wl$ ls -ltra

total 5696

drwxr-xr-x 5 abdul abdul 4096 2010-12-15 07:28 src

-rwxrwxrwx 1 abdul abdul 1134 2010-12-15 07:28 Makefile

drwxr-xr-x 2 abdul abdul 4096 2010-12-15 07:28 lib

drwxr-xr-x 101 abdul abdul 4096 2011-01-29 14:49 ..

-rw-r–r– 1 abdul abdul 121 2011-01-29 14:58 .built-in.o.cmd

-rw-r–r– 1 abdul abdul 8 2011-01-29 14:58 built-in.o

-rw-r–r– 1 abdul abdul 261 2011-01-29 14:58 .wl.o.cmd

-rw-r–r– 1 abdul abdul 2859419 2011-01-29 14:58 wl.o

drwxr-xr-x 2 abdul abdul 4096 2011-01-29 14:58 .tmp_versions

-rw-r–r– 1 abdul abdul 35 2011-01-29 14:58 modules.order

-rw-r–r– 1 abdul abdul 24215 2011-01-29 14:58 .wl.mod.o.cmd

-rw-r–r– 1 abdul abdul 9584 2011-01-29 14:58 wl.mod.o

-rw-r–r– 1 abdul abdul 4903 2011-01-29 14:58 wl.mod.c

-rw-r–r– 1 abdul abdul 223 2011-01-29 14:58 .wl.ko.cmd

-rw-r–r– 1 abdul abdul 2868396 2011-01-29 14:58 wl.ko

-rw-r–r– 1 abdul abdul 0 2011-01-29 14:58 Module.symvers

drwxr-xr-x 5 abdul abdul 4096 2011-01-29 14:58 .

For Exact Steps Please Refer :

http://dimitar.me/broadcom-wireless-chipset-bcm4311-bcm4312-bcm4321-and-bcm4322-on-ubuntu-karmic/

http://www.broadcom.com/support/802.11/linux_sta.php

Steps to copy and load the drivers:

sudo cp /home/abdul/source/hybrid/build/wl.ko /lib/modules/`uname -r`/kernel/drivers/net/wireless/

sudo modprobe lib80211

sudo insmod /lib/modules/`uname -r`/kernel/drivers/net/wireless/wl.ko

Steps to load the driver on every startup:

1. put the above commands in startup.sh file

2. put it in the /etc/init.d/ directory

3. Give full rights

chmod 777 startup.sh

4. sudo update-rc.d statup.sh defaults

\"I find that the harder I work, the more luck I seem to have.\"
~ Thomas Jefferson
 

I have never faced internet connection issues on ubuntu / linux, thanks to the Ndiswrapper / Additional driver of Ubuntu .

However some network hardwares like mine ( HP – Pavilion dv4 -1283cl ) require bit more work to bring up the internet connection.

1. First of all find the exact vendor name and model of your network hardware.

2. Search the vendor site to download the drivers for Linux incase exist else you need to manully build the wl.ko on your system and put it on the statup scripts.

For my laptop I’ve build the wl.ko file :https://docs.google.com/leaf?id=0B6gDoeCaurgfMzVmY2RlMDMtZjA5NS00MTQxLThiMTQtMzhmY2EwOTJjYzkw&hl=en

Exact Steps Refer :

http://dimitar.me/broadcom-wireless-chipset-bcm4311-bcm4312-bcm4321-and-bcm4322-on-ubuntu-karmic/

Steps to copy and load the drivers:

sudo cp /home/abdul/source/hybrid/build/wl.ko /lib/modules/`uname -r`/kernel/drivers/net/wireless/

sudo modprobe lib80211

sudo insmod /lib/modules/`uname -r`/kernel/drivers/net/wireless/wl.ko

Steps to load the driver on every startup:

1. put the above commands in startup.sh file

2. put it in the /etc/init.d/ directory

3. Give full rights

chmod 777 startup.sh

4. sudo update-rc.d statup.sh defaults

\"You must be the change you wish to see in the world.\" - Mohandas Gandhi
 

Blogilo – Best blog client on Ubuntu

Blogilo is an Amazing open source blog client for Ubuntu , the configuration to setup different blogging platform is really simple.

Just click Auto-Configure and Blogilo will pick the correct platform and API to post the blogs :

Issue :

If you are running the application first time on Gnome , you might get an error like " Can not connect to database "

The program is not installing the sqllite automatically so just install the DB and it will work without any issues :

sudo aptitude install libqt4-sql-sqlite

\"Most people don\'t recognise opportunity when it comes, because it\'s usually dressed in overalls and looks a lot like work\" - Thomas Edison
 

There are many tools / methods available to build a single jar having the dependent classes ( external libs) included on the single executable jar.

As far as I remember earlier only Borland’s JBuilder IDE was having this feature ( and .exe creation ) but now many open source api / ant scripts are available through which we can easily build a single jar file without any dependencies.

The best one is the Eclipse plugin : http://www.easyeclipse.org/site/plugins/fatjar.html

For Netbeans : http://arnoraps.tweakblogs.net/blog/4300/netbeans-single-jar.html

One Jar ( not so good) : http://one-jar.sourceforge.net/

\"I find that the harder I work, the more luck I seem to have.\"
~ Thomas Jefferson
 

HTTPClient from Apache is a nice API if you wanted to crawl the web through java.

I have used it in tasks like:
1. Automating some download.
2. Automation of form submit operation.

If you are behind the proxy server , make sure to add the proxy host and port on environment properties:

systemSettings.put("http.proxyHost", IP);
systemSettings.put("http.proxyPort", Port);

The use is quite easy for different http methods ( Get , Post..):


HttpPost httpost = new HttpPost("http://"+server+":"+port+propBaseURL+"?propertyName="+propertyName);

List nvps = new ArrayList();
nvps.add(new BasicNameValuePair("propertyName", propBaseURL));
nvps.add(new BasicNameValuePair("newValue", propNewValue));
nvps.add(new BasicNameValuePair("change", "Change Value"));
//http://strat-track.intranet.point/TrackingService.asmx/TrackingEnquiry
httpost.setEntity(new UrlEncodedFormEntity(nvps, HTTP.UTF_8));

HttpResponse response = httpclient.execute(httpost);
//entity = response.getEntity();

System.out.println("Login form get: " + response.getStatusLine());

\"Not everything that can be counted counts, and not everything that counts can be counted.\"
~ Albert Einstein
 
import javax.servlet.annotation.InitParam;
import javax.servlet.annotation.WebServlet;

@WebServlet(
    name = "HelloServlet",
    urlPatterns = {"/hello"},
    initParams = {
        @InitParam(name = "param1", value = "value1"),
        @InitParam(name = "param2", value = "value2")}
)
public class HelloServlet{

}
\"You must be the change you wish to see in the world.\" - Mohandas Gandhi
 

Some most popular high performance http servers and SSJS based on C10K problem

1. NGinx

ginx is a free, open-source, high-performance HTTP server and reverse proxy, as well as an IMAP/POP3 proxy server

Nginx is known for its high performance, stability, rich feature set, simple configuration, and low resource consumption

Nginx powers several high-visibility sites, such as WordPress, Hulu, Github, Ohloh, SourceForge and TorrentReactor.

2. Tornado

Tornado is an open source version of the scalable, non-blocking web server and tools that power FriendFeed. The FriendFeed application is written using a web framework that looks a bit like web.py or Google’s webapp, but with additional tools and optimizations to take advantage of the underlying non-blocking infrastructure.

3. Node.js

Sample code which will generate a non blocking server :

An example of a web server written in Node which responds with “Hello World” for every request.

var http = require('http');
http.createServer(function (req, res) {
  res.writeHead(200, {'Content-Type': 'text/plain'});
  res.end('Hello World\n');
}).listen(8124, "127.0.0.1");
console.log('Server running at http://127.0.0.1:8124/');

To run the server, put the code into a file example.js and execute it with the node program:
% node example.js
Server running at http://127.0.0.1:8124/
\"The strong man is not the good wrestler ; the strong man is only the one who controls himself when he is angry\" - Muhammad (pbuh)
 

Some good books link :

http://www.codinghorror.com/blog/2004/02/recommended-reading-for-developers.html

[gview file="https://docs.google.com/Doc?docid=0AagDoeCaurgfZGdkZm5wdHJfMjAwZmhtN3E0Z2Y&hl=en"]

\"The strong man is not the good wrestler ; the strong man is only the one who controls himself when he is angry\" - Muhammad (pbuh)
 

syncnotes2google – Good tool to sync Lotus calendar with Google :

Tried it and its working like a charm …

Create a simple scheduled job / batch file for the tool :

batch file : LotusSyncGmail.bat

c:
cd “C:\soft\LNGoogleCalSync-1.6\LNGoogleCalSync”
set path=C:\IBM\Lotus\Notes;C:\Java\jdk1.6.0_21\bin;%path%
set classpath=%classpath%;lib/beansbinding-1.2.1.jar;lib/commons-codec-1.3.jar;lib/commons-httpclient-3.1.jar;lib/commons-logging-1.1.1.jar;lib/gdata-calendar-2.0.jar;lib/gdata-calendar-meta-2.0.jar;lib/gdata-client-1.0.jar;lib/gdata-core-1.0.jar;lib/jasypt-1.5.jar;lib/jdatepicker-1.1.0.jar;lib/jdom.jar;lib/Notes.jar;lib/swing-layout-1.0.4.jar;.

java -jar icalbridge.jar -silent

Cheers !!

\"You must be the change you wish to see in the world.\" - Mohandas Gandhi
© 2012 Blogs and Tech docs Suffusion theme by Sayontan Sinha