Archive

Posts Tagged ‘computer’

Configure Gmail in Mutt easily!

It’s always wonderful to play with terminal. Last week, I tried to configure my Gmail account in mutt, a powerful console based mail client, using this tutorial. I had to create some configuration files for various related applications and executed some commands. Hence I thought it would be nice if there is any script/program to configure mutt easily by simply entering the Gmail ID and password. Here is such an application, written in C++, which will help you to configure mutt very easily. All that you need to do is install mutt and follow these steps :

1. Download this file
2. Exctract it to your home directory
3. Execute the following commands :

$cd muttgconf
$./muttgconf

VERY IMPORTANT: THE PROGRAM CREATES / MODIFIES MANY CONFIGURATION FILES. I WILL NOT BE RESPONSIBLE FOR ANY DAMAGE OR LOSS CAUSED BY THIS APPLICATION. USE IT UNDER YOUR RISK.

Get its source from git://github.com/ershad/Mutt-Gmail-Conf.git    Good luck 🙂

Advertisements

Salt Analysis Simulator V1.0 – Released!

January 16, 2010 7 comments

For the past few weeks, I have been coding to bring out a program to do salt analysis lab work virtually. We have salt Analysis as a part of plus two academics and it is a process of finding the anion and cation which the salt contain through a systematic procedure. We add many reagents / acids throughout the labwork and analyse the result to identify the anion and cation. I hope this program would help students to practice salt analysis at their home and would feel confident!

The program is completely written in C++ and is intended to work on M$ DO$ platform, becuase more students are using M$ Platform including Biology-science group students. Another techincal reason is that, I have used clrscr(), gotoxy() and getchar() many times which is a troublesome work to implement in ANSI standard.

The program works based on a new algorithm which I name it as “IntMatchReact” since the reaction process is done through a matching of integer values. While developing this software, I had a notion to implement anti-piracy for fun which was left on the way. The software is licensed under GPL and I would like you to go through the code and help in improving.

Please post your valuable comments and improvement tips. Thank you 🙂

Get SAS V1.0 (here)

Bug: i forgot to add exit function for ‘e’ key stroke, have exams now – will upload SAS with minor corrections soon 🙂

Categories: C++ Tags: , , , ,

The pleasure of solving!

December 14, 2009 7 comments

It’s been a quite long since I blogged something 🙂 May be a writer’s block* (*acronym for pure laziness,here);) Well, Last Saturday, I went to dxmk9 program conducted by NSS collage of engineering at Kottamaidhanam, Palakkad. I had registered my name for ‘Geek’s Paradise’ competition which is basically a C programming contest. The first task was to answer some objective questions, mainly to predict the output, was not much tough. The second task was to print a number pattern like this:

1
1 2 1
1 2 3 2 1
1 2 3 4 3 2 1
1 2 3 2 1
1 2 1
1

whooo! the problem was not easy for a newbie like me (‘m still in school,sir 😉 ), I simply wrote some printf() statements with some ++i,etc. and escaped! Also, I had no much time to think, I had promised to return home before 1 PM.

When I reached home, a sudden thought flashed across my mind “Why shouldn’t I give a try ?”. I booted my ubuntu system ( ‘m eagerly waiting to get Fedora in hands), took newly installed Netbeans IDE and started trying. After some time –  LOL 🙂 !! It worked!! The program asked for an integer input and printed the pattern exactly the way it’s meant to be! I know, this is a small problem and has nothing of great speciality or something, but don’t know why – The output gave me some moments of rejoice! A small pleasure of coding 🙂 Ha ha, I would like to share that code with you 🙂

/*
 *      121.c
 *
 *      Copyright 2009 Ershad K <ershad92@gmail.com>
 *
 *      Licensed under GPL Version 3
 */

#include <stdio.h>

main() {

    int n;
    int i = 1;
    int j = 1;
    printf("Enter a number: ");
    scanf("%d",&n);
    
    // Increment....
    for (;i <= n; i++ )
    {
        for(j = 1; j <= i; j++)
        {
            printf(" %d",j);
        }
        --j;

        for (--j; j >=1; j--)
        {
            printf(" %d",j);
        }
        printf("\n");
    }

    // Decrement....

     for (i = n-1;i >= 1; i-- )
    {
        for(j = 1; j <= i; j++)
        {
            printf(" %d",j);
        }
        --j;

        for (--j; j >=1; j--)
        {
            printf(" %d",j);
        }
        printf("\n");
    }
    
}

Patches are always welcome :) All the best, nice day!

Easy Clarity – Connect Easily!

September 5, 2009 2 comments

‘Disconnection’ is a routine process in dial up internet. Here is an C++ snippet which dials BSNL WLL Clarity without asking for password again and again. It automatically closes on disconnection with a beep sound.

/*
 *      easyclarity.cpp
 *
 *      Copyright 2009 Ershad K  ershad92@gmail.com
 *      Licensed under GPL Version 3
 *
 *      Please change USERNAME, PASSWORD and compile with g++
 *      To compile - g++ easyclarity.cpp
 *      To execute - ./a.out
 */

#include <iostream>
#include <stdlib.h>
#include <stdio.h>

using namespace std;

int main ()
{
	char username[] = "USERNAME";
	char password[] = "PASSWORD";
	puts("\n EasyClarity - Connect wisely!  www.ershadk.wordpress.com\n\n");
	ofstream myfile;
	system("sudo wvdialconf");
	myfile.open ("/etc/widial.conf");
        myfile << "[Dialer Defaults]\nInit1 = ATZ\nInit2 = ATQ0 V1 E1 S0=0 "
               << "&C1 &D2 +FCLASS=0\nInit3 = at+crm=1;+cmux=1;+cps=33;+cta=0"
               << "\nModem Type = Analog Modem\nISDN = 0\nPhone = #777\nModem"
               << " = /dev/ttyUSB0\nUsername = "<<username<<"\nPassword = "
               <<password<<"\nBaud = 460800\nStupid Mode = 1\nAuto DNS\nCheck"
                <<" Def Route";
	myfile.close();
	system("sudo wvdial");
	cout << "\a";
	return 0;
}

Setting up Malayalam and installing swanalekha in sabayon 4

Though the Sabayon 4 DVD release comes with SCIM , it’s not possible read Malayalam or write using swanalekha by the usual methods. Let’s see how to do it.

Type in terminal:

$sudo bash

#wget http://ershad.freehostia.com/download/AnjaliOldLipi.ttf

#cp AnjaliOldLipi.ttf /user/share/fonts/

Now you can read Malayalam :), To type using swanalekha, do the following :

#wget http://ershad.freehostia.com/download/install-swanalekha.tar.gz

#tar -xvf install-swanalekha.tar.gz

It’s done, Right click the text box, select “SCIM input method” and start typing !!

Select SCIM from right click menu

Unfortunately this is not working in firefox. Please inform me if there is any mistake or bug. Thanks to SMC 🙂

Categories: Uncategorized Tags: , , ,

A journey with sabayon…

Think of a wonderful world where you have every basic needs without much difficulty and effort. Quite interesting??  well,  This is what sabayon explains, where you will feel heaven if you are using slow Internet without compromising in quality and support.  A bit confusing ?? we’ll see…

My journey with GNU/Linux  started with gentoo  2 years before, when I had a tough time installing it as dual boot  and of  course, it  ended up in the complete data loss !! My next linux-try was ubuntu 8.04, the one that Jesse had given, was easy to install and use. The next OS’ that i tried was  ubuntu 8.10, ubuntu 9.04, kubuntu 8.10 and fedora. But the problem with all these was they are CDs !! Though they contain all basic softwares and packages, it was a tough job to get additional ones. I had to rely on my slow Dial up connection which would take 15 minutes to download 10 MB!! So the one and only choice was to get a DVD based distro.

For the past few weeks,  I was searching for such a DVD release distro so that the rate of software and package downloads can be minimised considerably. My next step was to find such a disrto. To download nearly 4.5 GB @ 16 kbps speed is obviously a nightmare. Then i thought of taking copy, but the source became a issue. As i don’t have any Linux based magazine’s subscription, it was almost impossible.  But later  i came to know that one my friends has such a subscription and he has a  DVD that contains sabayon 4.

Then the things went pretty fast. The installation of sabayon was easy and without XFCE and games, it consumed nearly 9 GB and  took 44 minutes to complete in my P4 2.6 GHz, 1.2 GB RAM Desktop.  The intial boot soon after the installation was slow and it took around 2 minutes to get the login screen. Even now, it is a wonderful sight for me to see many desktop environments including KDE, GNOME etc.. in sessions menu 🙂

Sabayon 4 has all basic free software and package by default. sabayon is meant for all type of users. The software collection explains this.  Inkscape, GIMP etc… are meant for graphic enthusiasts where GCC, JAVA,Python,etc.. are there for programmers. Like these, sabayom comes with many pretty and useful softwares so that users dont have to spend time searching for them. Well, there are the good sides of sabayon. As always, it has another side which is not serious but which worths mentioning here. In ubuntu and other distros, we can install any software or package by running ‘apt-get install’ in terminal which is not possible in sabayon. Also, sabayon dont support deb/rpm packages by default though the team claims it is not necessory where the internal package manager is more than enough. But it would have been better if  sabayon supports that also. Next issue is that, it doesn’t support malayalam by default where i had to install it manually.

Well, I’m not going more technical because, this is my limit. I should stop here, the rest ie about it’s core,kernel, working, etc… are available over web. Please have a look at it if you are interested. I haven’t read this post twice, so they are chances for grammatical/technical/spelling mistakes. Please point them out. Thank you

Categories: Uncategorized Tags: