I see, learn and rediscover… everyday!
 
Category: <span>code</span>

Advanced Bash Scripting – Part 1

Hello everyone, I’m planning to solve the problems in the Advanced Bash-Scripting Guide, say like one problem per week. Why am I doing this? 1. The problems there are very interesting. 2. Working in windows all the time, I feel I’m losing my shell scripting abilities. This will keep me updated. The problem we are going to solve this week …

Install multiple firefox extensions

I’m a full time web developer now. Million thanks to Firefox, web development is made much much easier. To make the web development process easier, there are many many extensions. A few of them I use for my development, 1. Firebug 2. Web Developer 3. ColorZilla 4. MeasureIt 5. ViewSourceChart 6. FireCookie 7. YSlow 8. Delicious. 9. Twitterfox 10. CSS …

Save Before Save – Gedit Plugin

A few days back, I got a mail from my friend, saying, Subject: Versioning in Windows Hi guys, Does any one know a software that can version files in windows? As simple as: There’s a certain folder of files I want to be “version” tracked, I specify the list of folders. After this, every change I make is time-archived. So …

Online Programming Contest Calendar.

Hi all, I’m very happy to present you Online Programming Contest Calendar (http://www.opccalendar.com/). This is something I wanted to do for Spider in college. All I could finish in college was a simple fetcher from algorithmist.com and topcoder.com. Now, I have everything I wanted to have in this new site. And yes, I hated the algorithmist.com calendar. There was so …

Dictionary attack

This is a tutorial about how to perform a dummy dictionary attack and how web-masters can prevent a dictionary attack. Wikipedia defines Dictionary attack as, In cryptanalysis and computer security, a dictionary attack is a technique for defeating a cipher or authentication mechanism by trying to determine its decryption key or passphrase by searching likely possibilities. A dictionary attack uses …

Software Development Cycle

Programmer produces code he believes is bug-free. Product is tested. 20 bugs are found. Programmer fixes 10 of the bugs and explains to the testing department that the other 10 aren’t really bugs. Testing department finds that five of the fixes didn’t work and discovers 15 new bugs. Repeat three times steps 3 and 4. Due to marketing pressure and …

Obfuscate C Code – Part III

Hi all, This is my third post on the series of articles I’m writing on C code obfuscation. You can check all the posts I’ve written about obfuscation here. The task for this post is quite simple. Given two numbers a and b (b>a>3) as input, print all prime numbers in between a and b (including a and b). Let …

Obfuscate C Code – Part II

Hi all, this is my second post on C code obfuscation. You can check out all my posts on obfuscation here. In this post, we’ll see two techniques which one can use in C code obfuscation. The more we apply these to our code, the more obfuscated our code will result in. And of course, this is not the complete …

Obfuscate C Code – Part I

Hello, this is the first post I’m writing on C code obfuscation. Let me warn you before I start. I am a beginner in code obfuscation and still learning from different code snippets I get from my friends. Since this is the first post in this series, we will start with hello world. But instead of printing the same old …

Swirl images with ImageMagick

This simple snippet can be used for creating animated gif images with swirl effects. I was bored at home and saw that ImageMagick was installed in my machine. 🙂 So started playing with that. 🙂 The shell script will create the second image from the first image shown below. —–> #!/bin/bash FILENAME=”hari.png” FRAMES=30 ROTATEANGLE=30 OPTION=”swirl” declare -i I COMMANDOPTION=””; I=0; …

Fetching the internet…

This is a simple tutorial to fetch web pages using php code. This starts with a example to fetch pages, and then sending get and post request :). First, a few stuff from the php manual. This is just a summary. You can read the whole stuff at http://in.php.net/manual/en/book.curl.php “””PHP supports libcurl, a library created by Daniel Stenberg, that allows …

Forgot the match again?

Do you play Topcoder? If yes, then there might be something for you in this post. If you don’t know what topcoder is, check http://topcoder.com/tc and then come back here. If you play topcoder, then keeping track of when the next match is a big headache. There are many many people who login to the arena one day before the …

Setting up a SMS server using Gnokii

I’ve used gnokii to set up a SMS server in our college as a part of Spider Project. Though I didn’t actually believe that a computer and a mobile phone can be connected when Manas suggested the idea, I coded much for this SMS server later. 😛 So here is the short manual about how to configure gnokii in a …

Google Image Search

I don’t remember who exactly gave me this script. Must be either Verma or Manas, but this one is so cool. The code looks pretty easy and clear, though I didn’t try to understand it completely. So this is what you have to do. Open Google image search and search for some image. If you are lazy to do that, …

Finally….

This is one of the question you find being asked when browse for around 10-15 minutes. “Your message has not been sent. Discard your message?” from Gmail. “Are you sure you want to navigate from this page? Your message has not been sent. Press OK to continue, Cancel to stay on the current Page” from Gmail “Are you sure you …

Google Maps – Icons

This post is for playing with icons in Google Maps. In the previous post, the last example explained how to add markers when we click on the map. We will try to add custom markers and change the properties of different markers before and after creating them. In the first example, we’ll create a custom marker instead of the default …

Google Maps

I have been using Google Maps for a long time (a nice way to kill time) and now I am using the Google Map API to create my own site (not a nice way to kill time). Was able to start with my work using the sample examples given in the Google Maps site and by trial and error method. …

Bash spellchecker

Spell checking in bash is a cool feature which can be added by adding just one line in your bashrc file. shopt -s cdspell That’s all 🙂 Add that to your ~/.bashrc file. If you want to enable this for all the users, then append this to your /etc/bash.bashrc (in Ubuntu) or /etc/bashrc (in Fedora). Of course, you need the …

Exams :'( :'( :'(

Semester exams starting tomorrow. Do i need to say more? :'( :'( :'( :'( :'( :'( :'( :'( :'( :'( :'( :'( :'( :'( :'( :'( :'( :'( :'( :'( :'( :'( :'( :'( :'( :'( :'( :'( :'( :'( :'( :'( :'( :'( :'( :'( :'( :'( :'( :'( :'( :'( :'( :'( :'( No, that’s not enough. I …

SSH Client…

I guess every GNU/Linux user must have sshed from one comp to another sometime or the other. We have different servers for various purposes in our college and ssh is a common thing. Most of the time, we end up typing some thing like ssh -XCYP hari@spider.nitt.edu Though not many knows what these options stands for, life will become very …

LDTP Editor

Want to use LDTP to test your application? Or do you want to automate the actions you do often? Or are you a GNU/Linux user who want to show “magic” to your friends by recording your actions and playing them back? You can use LDTP for this. But one small issue with LDTP is that you should know the LDTP …

Gedit Plugin

In this article, we’ll see how to write plugins for Gedit. Since plugin development is easy in Python, I’m planning to explain this using Python. When the first caveman programmer chiseled the first program on the walls of the first cave computer, it was program to paint the string “Hello, world” in Antelope pictures. Roman programming textbooks began with the …

External Tools

  Often you would like to have a feature in gedit like, Compile when F7 is pressed, Compile and Run when F8 is pressed and more and more. One simple (grrr…) solution for this is to write our own plugins. But to write a plugin for gedit in python, you need to know pygtk and of course python. A simple …

Gedit

Every GNU/Linux user must be knowing about Gedit. This tiny text editor which comes with gnome is much more powerful than we all think. A few customizations and adding a few plugins will convert this simple text editor into a complete IDE for any programming language. In this article, i have mentioned about the configurations i have made in my …