Tuesday, November 26, 2013

SQL*PLUS

This is a quick and dirty installation of sql*plus in debian based systems.


1. Download sql plus

oracle-instantclient12.1-basic-12.1.0.1.0-1.i386.rpm
oracle-instantclient12.1-sqlplus-12.1.0.1.0-1.i386.rpm
oracle-instantclient12.1-devel-12.1.0.1.0-1.i386.rpm

2. Install 'alien'

#apt-get install alien

3. Install rpms

#alien -i oracle-instantclient12.1-basic-12.1.0.1.0-1.i386.rpm
#alien -i oracle-instantclient12.1-sqlplus-12.1.0.1.0-1.i386.rpm
#alien -i oracle-instantclient12.1-devel-12.1.0.1.0-1.i386.rpm

4. Install Linux kernel AIO library

# apt-get install libaio1

5. oracle.conf

# touch /etc/ld.so.conf.d/oracle.conf
# echo "/usr/lib/oracle/12.1/client/lib/" >> /etc/ld.so.conf.d/oracle.conf

6. configure dynamic linker run-time bindings

# ldconfig

7. Edit ~/.bash_profile and export oracle client path.

export ORACLE_HOME=/usr/lib/oracle/12.1/client64




7. Create the following file.

 # touch $ORACLE_HOME/network/admin/tnsnames.ora

8. connect to a db

# sqlplus user/password@192.168.1.8:1521/orcl

Saturday, November 16, 2013

django mysql exception

After facing some compatibility issues of my system, I upgraded my debian squeeze to wheezy. I used Python2.6 and the latest distro upgrade gave 2.7 version, which cause me to fix so many dependencies of my django project. This is one issue I faced.

    new_class.add_to_class('_meta', Options(meta, **kwargs))
  File "/home/jgeek/playground/project-wl/local/lib/python2.7/site-packages/django/db/models/base.py", line 264, in add_to_class
    value.contribute_to_class(cls, name)
  File "/home/jgeek/playground/project-wl/local/lib/python2.7/site-packages/django/db/models/options.py", line 124, in contribute_to_class
    self.db_table = truncate_name(self.db_table, connection.ops.max_name_length())
  File "/home/jgeek/playground/project-wl/local/lib/python2.7/site-packages/django/db/__init__.py", line 34, in __getattr__
    return getattr(connections[DEFAULT_DB_ALIAS], item)
  File "/home/jgeek/playground/project-wl/local/lib/python2.7/site-packages/django/db/utils.py", line 198, in __getitem__
    backend = load_backend(db['ENGINE'])
  File "/home/jgeek/playground/project-wl/local/lib/python2.7/site-packages/django/db/utils.py", line 113, in load_backend
    return import_module('%s.base' % backend_name)
  File "/home/jgeek/playground/project-wl/local/lib/python2.7/site-packages/django/utils/importlib.py", line 40, in import_module
    __import__(name)
  File "/home/jgeek/playground/project-wl/local/lib/python2.7/site-packages/django/db/backends/mysql/base.py", line 17, in <module>
    raise ImproperlyConfigured("Error loading MySQLdb module: %s" % e)
django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: No module named MySQLdb


Solution:

install "python-mysqldb" "libmysqlclient-dev" from distro repositories.
install "django"
install "mysql-python" from pip.
          $ pip install mysql-python

run "python manage.py syncdb" again.

Tuesday, November 12, 2013

Compare Files


Here are  two KDE project utilities to compare files, awesome.


kdiff3


kompare
                         

Saturday, August 10, 2013

how to patch your code ?

Some of you(programmers) might not have tried patching tools before. There are many tools exist for Unix and windows to do patching. I started an opensource project a few weeks back and had no idea of what tool should I use to patch my code when needed. After a few read, I have found some tricks to do a good patching.  

If you are using a Unix system, this method might be really helpful to patch. Assume your source directory name is "test" and one of your code contributors got the same source directory.Now, you make a replicate directory of "test" called "testm" and do some changes to the source inside it. After a unit test, you want to send the modified source as a patch to your contributor. 

Open up a terminal and change the location to the parent directory of "test" and "testm".

  •  diff -Naur test testm > testpatch1.patch

Send the "testpatch1.patch" to the contributor and they should apply this patch to their source. 

  •  patch -Np1 --ignore-whitespace -d test < testpatch1.patch

Note: In this "diffing" and "patching" approach, you can include not only changes but also newly added files to the patch.

Sunday, June 16, 2013

Hungry Eyes

 I spent this weekend like a sleeping bear. It was really bored and my plans for the weekend smudged due to many reasons. One was to watch fast & furious 6, in theater. However I couldn't.  Instead of watching a new movie, I decided to watch a retro movie on Sunday. It was "Dirty Dancing". Thanks to my buddy Kristi, I got a streaming link to watch it online.

Photo Credit: Dirty Dancing Movie


The story plot is typical and not that strong as it seems. The entire story based on a vacation of Houseman Family. It was a three weeks vacation in Catskill Mountain resort. Even though it is a small story, still it gives you a good entertainment from the music and strong acting. Well, I forgot to mention about the dance. Yes, it's all about the dance. Patrick Swayze's (Johnny Castle) dance is really amazing, and I wish I could dance like him. :D Not only the finale dance for the song "Time of my life", but also in the other dancing moments, he got all the eyes from his sexy partners. Jennifer Gray (Baby Houseman) also danced well, but for me, Cynthia's (Penny Johnson) dance is the best. After all, I can say, Dirty Dancing is the best dance movie I have ever seen.  

Patrick & Cynthia,
Photo Credit: Dirty Dancing Movie


Saturday, May 11, 2013

Universal Database Manager

After a busy period, finally I got some time to spare for this blog. This time, I'm going to share something I use for my daily work in both industrial and personal.  In my technical life, I have to manage many types of databases. They are mostly varying among popular dbs, like mysql, oracle, postgre and db2. The problem I have faced was, how to manage all from one db client. I tried many clients, and some are restricted for only one specific db or others are commercial and expensive. As a free software lover, I use them as much as possible for my work. So I have found a good solution to handle multiple dbs.

It's DBeaver and it comes under GPL license. It supports for all the databases, which have JDBC diver. If you are familiar with Java eclipse GUI design, this can be visually close to you. I'm not going to explain all the stuff related to DBeaver and you can find much information regarding this awesome tool.


Sunday, April 7, 2013

STAR WARS


'a long time ago in a galaxy far, far away .....'


Just want to make a little post about some interesting work I found on the Internet. This is the ASCII version of famous movie called STAR WARS. I don't need to spend more words on this, just try this out.

Open a terminal and telnet to 'towel.blinkenlights.nl' and go. I tried this on my Debian Linux ,and hope it will work on Windows as well.

ex: # telnet towel.blinkenlights.nl


note : this is from a remote server. we use telnet to connect.


Tuesday, March 26, 2013

Celtic Music

Before I start, just want to mention that, I have used the word "music" for both music and songs. Apparently, there is a huge difference between songs and music, where no explanation needed.  
Music is a cure to reduce our stress and a good friend for loneliness. There is no argument, that the taste of music depends upon the person and the situation. Well, my taste of music varying widely from classical to modern music, I like most of the classical songs, apart from 00s songs and I have a collection of 'ABBA', 'BeeGees', songs in my hard disk. Since I have born and live in southern Asia, except local music, mostly we hear US music and some Hindi (Indian) music. As a personal favor, I don't like many modern US songs which contain raps and foul language, which are not help full to release my mind.

Clannad group; Photo Credit: www.clannad.ie

Celtic music, European folk music, New Age music, etc. is not popular in my country, probably in Asia. However, I was lucky to find them on Youtube a few years back, and now I'm a Celtic fan. Clannad is one of the greatest classical Celtic and New Age group and I like the song "Newgrange"  which explains about a mysterious place in Ireland. Clannad performed in early 80s, and their contribution for the Celtic music is remarkable.
In 00s, a group called Celtic Woman established to continue old Celtic folk music and some Clannad music with on stage live shows. Honestly speaking, I have listened to Clannad and Enya (former Clannad member) songs before, but I really got to know about Celtic music after  I listen to Celtic Woman. I really like their live shows (unfortunately I haven't seen them for real) not because gorgeous women perform on the stage, but their voices and the way they conduct the show. They use traditional instruments with modern technologies, which brings awesomeness to their show. In 2006, they did a studio album + a live show, titled "Celtic Woman: A New Journey" which is my favorite.

Celtic Woman : A New Journey 2006

Today, unlike a few years back, Celtic Woman has become very popular, but the group has reduced to four members by disappointing their fans. I still like to see  Chloë Agnew, Órla Fallon, Lisa Kelly, Méav Ní Mhaolchatha and Hayley Westenra perform as Celtic Woman vocalists.

Sunday, March 10, 2013

Prediction vs Reality

Arthur C. Clarke's Space Odyssey series of novels are my favorite novels. I read them all including 2001, 2010, 2061 and 3001 a long time ago when I was a kid. I had no idea about the storyline, somehow I enjoyed the space adventure of my own imagination. 2001: A Space Odyssey had written in 1968, even before Apollo 11 journey. The movie 2001: A Space Odyssay is considered as one of the best movies of all time. I watched it two years ago and still I'm wondering how did they build that movie in the 60s.



After all, this series of novels brings some real facts that we are experiencing. I have no idea about "Monolith" (a black cuboid), but the other explained things like space traveling (Discovery and Alexei Leonov), fifth generation computer (HAL) and evolution of a non-human species (creators of Monolith).

In the present day, we can clearly note some of the evidence which proves about these fictional facts. Modern computer scientists keep doing research and making new algorithms to improve the artificial intelligence until they build a computer with feelings. The space traveling is  roll-backed, if you compare with 60s and 70s. However, we can see some long term projects to make a journey to the Mars. Evolution of our own species is now moving to machines. As described in 2001: A Space Odyssey, the Firstborn discovered later how to transfer their consciousness onto computers, and thus they became thinking machines. In the end, they surpassed even this achievement, and were able to transfer entirely from physical to non-corporeal forms - the "Lords of the Galaxy" — omniscient, immortal, and capable of travelling at great speeds. What will happen next ? Will someone completely transfer in to a machine?

Sunday, March 3, 2013

Geeky Linux

I was in the middle of a long debate about typical Windows and Linux topic. This wasn't a real debate, just a discussion among friends. The main argument was, why Linux isn't popular even it distributed as a free product ?
My conclusion is, in earlier days, Linux was mainly a terminal based operating system. The old versions had a basic desktop environment with a powerful terminal. So every Linux user had to use the terminal, which is a pain for normal computer users. Older version of windows had a better GUI interface rather than Linux. Therefore, many users chose their OS as windows and a trend has begun.
Due to the popularity of Windows, many software vendors decided to build their products to Windows platform and later they build a Linux version as well.
The main problem in Linux is, you cannot find Linux as a single OS. It is a kernel and the platform always depends on the distribution. Example, if you download "vlc" for Redhat (.rpm), you cannot use it in "Debian" (.deb).
As a solution, Linux community uses archives which are compatible for all platforms. The drawback behind archive installation is, if the uses are non technical person, they might find it difficult to install dependencies (libraries) or compile the source.
Troubleshooting the system and applications is something we have to do with our own. I use both Linux and Windows, apparently, I can say, troubleshooting Windows is much easier than Linux.
In Windows, most of the installations can be done by double clicking and filling the installation wizard.
I think, Linux is improving and moving from geeks to normal users, especially Ubuntu distribution. Hopefully, they will make an OS which can do 90% of things without using the terminal.
PS: I haven't mentioned Mac OS, because I have less knowledge about it.

Saturday, March 2, 2013

Local Repositories

My debian iso dvd is unreadable for some reason. Fortunately, I copied that dvd to my brother's machine, which contains 500GB of hard drive. My PC has a smaller disk, and I'm afraid to waste it for replicating. My problem was, how to add that copied dvd to my repositories ?
After a google search, I found a solution. Let me briefly share it with you.
If you really want to maintain a local repository which is in your network, you can use NFS server.
package: nfs-kernel-server
  • create a directory, "mkdir -p /repo/deb"
  • edit "etc/exports" file and add the following line,
"/repo 192.168.1.0/24(ro,root_squash,sync,no_subtree_check)"
  • restart "nfs-kernel-server"
Optionally, you can use "chkconfig -e" to add nsf-server as a start-up service
and perform "showmount -e localhost" command to get the export list. After all, you can extract the iso image to "deb" directory. (or replicate)
In your client machine, you can add "nfs://<server ip>/repo/deb <alias>" line to "sources.list".
This is useful, if you run a local network with many Linux hosts.

Thursday, February 28, 2013

Crop Circles

Ancient Aliens from History Channel is one of my favorite documentaries. Personally, I believe "we have been visited in the past by extraterrestrial beings". 
Recently, they have created some episodes with less details, specially without the information against their theory. I'd like to share more details of less explained Crop Circles. A latest episode of Ancient Aliens describes about the mysterious phenomena of the Nazca Lines. There is no doubt, Nazca lines are unexplainable. However, apart from Nazca lines, they explain Crop Circles as some kind of text from ETs. Well, I think, they should have explained more about Crop Circles without showing them from above. After a small search, I found an old documentary program called "mysterious universe" by Arthur C Clerk which explains further about Crop Circles and considers them as a bunch of Hoaxes.



PS: You can find the other parts of this video in the right side video panel.

Project Infrastructure

If you wish to host your project somewhere in the internet, you may find many places to do that. Google code, sourceforge and GitHub are widely used hosting services. For free software (FOSS), Free Software Foundation maintains a project infrastructure called "Savannah". This isn't popular among developers. However, some FOSS lovers use to contribute for other projects and host their own projects in "Savannah". It uses Git and CSV repositories with a special designed simple bug tracking system. I like "Savannah", because it has a simple interface with many options.   https://savannah.nongnu.org

The Levitating, Meditating, Flute-playing Gnu logo

With a fresh start

After sometime, I decided to write a blog about my stuff. I've written a technical blog which called "burningnotes" and I think, it's time to move to a new blogging style.