Synapse ↵

logically incoherent… not!

Archive for December, 2005

A dip in the cup of Bash scripting

Posted by synapse on December 28, 2005

Scripting is one of the most powerful tools of any Linux box. Tasks which require repetitive actions and seem to take forever to complete can be automated in a jiffy. The possibilities are endless. Since built in Linux commands can be used in shell scripts this opens up countless ways to write scripts. The three scripts that follow are basic examples to get you started. In the future I will be writing a tutorial on bash scripting. For now, im throwing a bit of source code in your face.

Read the rest of this entry »

Posted in Linux, Source Code | 6 Comments »

I/O redirection in Linux

Posted by synapse on December 28, 2005

In this article, we will explore a powerful feature used by many command line programs called input/output redirection. As we have seen, many commands such as ls print their output on the display. This does not have to be the case, however. By using some special notation we can redirect the output of many commands to files, devices, and even to the input of other commands.

Read the rest of this entry »

Posted in Linux | 1 Comment »

Convert source code (tar.gz) to a RPM installable

Posted by synapse on December 24, 2005

New releases of Linux programs are generally released in the tar.gz format consisting of source code of the application. Normally you compile these programs but at times they throw some compiler errors in your face which just seem gibberish to a novice. A much easier way to install programs is when they are in the RPM package format.

Here’s a simple guide that will help you convert those source code files (tar.gz) into RPM packages -

Read the rest of this entry »

Posted in Linux | 5 Comments »

Quick start with the Vi Editor

Posted by synapse on December 24, 2005

The Vi editor, though a daunting thought at first and difficult to grasp for all you GUI fans and newbies can prove to be a powerful and time saving solution especially for developers. Once mastered it can become an indispensible tool. The best part about this wonderful editor is its speed. Here is my tribute to this wonderfull editor - Read the rest of this entry »

Posted in Linux | 3 Comments »

Debugging with GDB (Gnu Debugger)

Posted by synapse on December 20, 2005

GDB (Gnu Debugger) is a powerful debugging tool for both C and C++. A debugger is a program that helps you find bugs by letting you examine the state of the program as it’s running. You can view the code, see the values of the variables, follow the control flow, break in the middle of an infinite loop, and more. This article is a quick introduction to the most common and useful GDB commands and techniques.

Read the rest of this entry »

Posted in Programming | 5 Comments »

Setting up a Cron job

Posted by synapse on December 15, 2005

Crontab is a useful program that allows you to execute a command when ever you want it to run. Crontab can be found on most, if not all, Linux and Unix systems.

Getting Started with Crontab…
Type crontab -e as the user that you want the Cron Job to be executed as.
The format of the job is like this.

I’m going to use some varibles, you should remember those from algebra, for those of you that don’t it is a letter that represents another value (usually a number).
Read the rest of this entry »

Posted in Linux | 3 Comments »

The Generator Blog

Posted by synapse on December 14, 2005

This is a really different kind of blog that I came across. It contains all different kinds of generators like name generator, anagram generator, bitch letter generator etc. The list goes on… Most of all, I really  liked the intro of the site -

This blog is not about those machines used to change mechanical energy into electrical energy. It’s about software that creates software. Software to play around and have fun with.

Click the following link to visit the site -

http://generatorblog.blogspot.com/

Posted in Uncategorized | 2 Comments »

Postgres SQL quick setup in Linux

Posted by synapse on December 14, 2005

There are end number of articles on the net on setting up Postgres server for Linux. But the thing I hate about them the most is that they delve into unecessary complexity. Pages and pages of lengthy procedures and explanation when all a user wants to do is set Postgres up and get some work done. The following commands have been tested on Suse 9.2, 9.3 and FC4. It should work on the other distros too. So here’s how you can setup your Postgres in a jiffy -

Step 1 (Download)

Download Postgres using the following command in Fedora -

# yum install postgresql postgresql-server postgresql-devel

If you are using another distro then download the appropriate packages for your flavour and install Postgres. This is simple enough and you shouldnt have any problems so far.

Read the rest of this entry »

Posted in Linux | 3 Comments »

Accessing user information on an Unix system

Posted by synapse on December 14, 2005

This is a very good article taken from -

http://users.actcom.co.il/

I just had to share this one with those who wish to write programs that access user information. I’m developing a lab management project which needs to collect information about users and users who are logged into the system. That’s where I came across the following article. Click on the link below to view the full article -

http://users.actcom.co.il/~choo/lupg/tutorials/user-info-api/user-info-api.html#users

Warning - The system code used might make you feel a little faint or weak in the knees. If you arent interested in programming you might as well skip this article ;)

Posted in Linux | No Comments »

Campus Rock Idols rocked

Posted by synapse on December 12, 2005

Today were the western region finals of the campus rock idols that takes place annually. Bands from different campuses compete against each other for a shot at the title. This years function saw the participation of bands like Brute Force, Nemesis, Raging Hormones (wid a female drummer), Black Hole Theory etc. and a special appearance by Zero. It wasn’t very crowded in the morning as compared to the evening. One thing I noticed this year was that the crowd was a lot better than last year.

Free Image Hosting at www.ImageShack.us Read the rest of this entry »

Posted in Uncategorized | 3 Comments »