Archive
How to download .deb packages for offline installation
Some of my friends always complain that they are not able download packages due to Internet availability issues or usage limit. Most of them are using different Ubuntu versions, hence I cannot use APTonCD to download the packages for them. Here’s a small solution for this, Thanks to ilug-tvm and Rajeesh ettan.
Step 1: Get the download URLs in a file :
Execute the following command replacing package-names with required ones, separating by a space.
$apt-get -y install --print-uris package-name | cut -d\' -f2 | grep http:// > apturls
Step 2: Copy this file (apturls) to a machine which has high-speed Internet access, and execute the following command to download the packages:
$wget -i path-to-apturls-file
Step 3: Now get those downloaded packages to your machine, and install them using :
$cd path-to-the-downloaded-packages-directory$sudo dpkg -i *.deb
Done!
Thank you, Good Luck
Salt Analysis Simulator V1.0 – Released!
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
C++ Program to tweet
It’s very interesting to play with C++ and if it is in GNU/Linux, lots of tools like ‘wget’, ‘grep’,etc. are there to help us in time. Here is a simple C++ snippet which tweets directly to your time line. Feel free to add more features and would be great if you could share it with me too
/* * shell-tweet.cpp * * Copyright 2009 Ershad K ershad92@gmail.com * Licensed under GPL Version 3 * * Please change USERNAME, PASSWORD and compile with g++ * To compile - g++ shell-tweet.cpp * To execute - ./a.out */#include <iostream>
#include <string.h>
#include <stdlib.h>using namespace std;
int main()
{
char name[] = “username”, password[] = “password”, status[500], cmd[500];char sym[] = {char(34),”};
again: cout << “\n Status: “;
fgets (status,140,stdin);cout << “\n Length = ” << strlen(status);
if (strlen(status) > 139)
{
cout << ” Exceeds 140 character limit, Type again \n”;
goto again;
}
else
{strcpy(cmd,”wget -nv –keep-session-cookies –http-user=”);
strcat(cmd,name);
strcat(cmd,” –http-password=”);
strcat(cmd,password);
strcat(cmd,” –post-data=”);
strcat(cmd,sym);
strcat(cmd,”status=”);
strcat(cmd,status);
strcat(cmd,sym);
strcat(cmd,” http://twitter.com:80/statuses/update.xml”);system(cmd);
cout << “\n Done”;
}
return 0;
}
Easy Clarity – Connect Easily!
‘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 !!

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

