Showing headlines posted by ankur1990

New Blog Post : GitHub Repository For Pygame Examples

PygameAPI is an extension of SDL in python. You can create games quickly and easily using this. I recently created a repository on github named as ‘Pygame-Examples-For-Learning’ to motivate the learning of this API. This repository consists of various small demos (from hello world to the sprite demo). You can try out those using your own logic and can apply the same into large programs. It also includes a small 3 level game ‘Hungry-Snake’ . Just a contribution from my side to all the enthusiast learners out there (open source too) Play with the code to explore more. I will keep updating the repo in future also.

How To Unlock More Space In Linux

When you format a partition in Linux , 5% of the total space gets reserved for privileged processes, by default . This is done so that system processes continue to function correctly ,if the filesystem gets full. This is useful for your ‘root’ partition.However if you have let us say 50GB separate home partition, you may want to make use of few additional GBs by reducing the percentage of the reserved space. You can use tune2fs command to change the default allocation of space reserved for privileged processes. Command for the same is : #tune2fs -m 1 /dev/sda6

Links To All My Linux For You Articles

I started writing for Linux For You Magazine in August 2010. Since Then I have written over 10 articles for this International Magazine. Today I am providing the readers with all the links to my articles. All the work done is under Creative Common License as described in the sidebar widget also. So Let's get started

Search Wikipedia Through CLI (Shell) In Linux

Wikipedia : One of the most important web portal in geek’s life. Whenever I need to search anything I use two things. First open up the Google and then search for the related wikipedia page. Exploring wikipedia page using shell is possible. Interested fact is that we can do it without even opening the cli browser. We can make wikipedia text query over dns for an ip address. I learned this trick from Ajay Sharma (ajayctk@gmail.com). Thanks to him for teaching me this wonderful trick. Let’s explore how to do it

How To Extend Size Of The Storage File

In our previous post “using a file as a storage device” adrian asked a question to us : is it possible to extend the size on the ‘filename’ file? We searched on it and figured out the answer. Let’s roll Lets say you create a file name /newfile of size 200MB and format it, after a while you want to extend the file size. To do that do the following Step 1. Lets say you want to increase the file size by 100MB dd oflag=append conv=notrunc if=/dev/zero of=/newfile bs=1MB count=100 Now, the file is 100MB larger. Step 2. Run file system check on the file

Khan Academy: Spreading Education In the Open Source Way

Khan Academy, a non-profit organization that provides free online education to anyone, anywhere in the word. Khan academy was started by Salman Khan (No Bollywood Connections), who quits his job to start online teaching. “Its our mission to accelerate learning for students of all ages.” – thats the slogan of Khan Academy. Khan teaches on an electronic blackboard with his voice in the background explaining all the concepts. He never appears in the videos. Initially he started teaching maths, now his lectures covers Physics, Chemistry, Finance, History, Computer Science and much more. Khan Academy also provides online exercises, to practice what a student has learned. You can login using Google or Facebook , and the website will track your progress

3 Level Snake Game Made By Me Using Pygame API

Few weeks back I made out the basic of the snake game in python and released it on the Web under the file name “hungry.py”. Now I have Upgraded it into a 3 Level Game. I test it on windows and its working completely fine over there too. Download the “Game.Zip” file to play all the three levels and “hungry.py” to play the basic version. Releasing this under GPLv3 :) Try it out and feedback would be gr8. Here’s the download link http://code.google.com/p/hungry-snakes/downloads/list . Thanks Ankur Aggarwal

Using A File As A Storage Device

We all know that file stores our information in many types of formats. But do you know that we can use it as a storage device too. Surprised? Let’s go through the crazy process We are going to create a empty file in Linux, format it and then mount it as if we are mounting a partition. This process is long , So to understand it easily I am dividing it into 4 steps.

An Introduction To Linux Command Line Part-1

There are two types of user interfaces Graphical User Interfaces (GUI) and command line interface (CLI). In GUI you use mouse to give instructions, in command line you type commands to control your computer. Linux provides two ways of exploring command line, you can either start a terminal emulator or switch to virtual console. Terminal Emulator Terminal emulator is a program that provides access to command line when you are in GUI. It opens up a window in which you can type commands. To start a Terminal Emulator look in the application menu.

Using Emacs Text Editor – Part 2

This is the next part i.e part-2 of my article which got published in the International Magazine “Linux For You” also popularly know as LFY. The article was published under the name of “Let’s Play With Emacs CLI” in the August 2010 edition. All the work done is under the creative common license as specified in the widgets also If you are new to Emacs and want to learn it ,You must visit the Part-1 first.

Using Emacs Text Editor – Part 1

This is a part of my article which got published in the International Magazine “Linux For You” also popularly know as LFY. The article was published under the name of “Let’s Play With Emacs CLI” in the August 2010 edition. All the work done is under the creative common license as specified in the widgets also Text Editors are very important tool for everyone, especially for the programmers. So let’s play with them I am going to discuss the basics of Emacs text editor in this post.

Linux command Types (Internal and External)

We can classify all of the Linux/Unix commands into two types- Internal And External. Internal commands are the shell built-in commands while external commands are files present in the $PATH. (Remember we treat everything in the Linux as a file). Commands like pwd, cd ,echo comes under the category of the internal commands while ls,cp etc comes in the other category. To check whether the command is internal or external we will use the typeutility (type itself is internal one)

Using Cat Command in Linux To Create,Display,Append and Concatenate files

Cat is one of the most well know commands of the Linux as well as of Unix systems. It’s mainly use to display the file contents of a small file on the terminal. But scope of the cat commands is not just limited to display, We can use the cat command to create,append and even in the concatenation of the two files. In this post we will learn how to complete these jobs using the same cat command.

Compress your files using tar and gzip utility

Compression of files is a necessity these days. It’s not only helps you in saving your space but also helps you in quick sharing and back up purposes. Text files compresses more than the web images and videos because they are already in the compressed form .You must have observed many open source softwares in the .tar.gz packages. These are the compressed file made out using the tar and gzip (gunzip) utility. So let’s get started with these great utilities

How Bash Shell interprets a command ??

In this previous part of this article we learned about types of shells . In most of the Linux distributions , bash shell is the default shell. So we are going to discuss the working of bash shell in this article . Fasten your seat belts and get ready for the bash ride Normally we think that when we type a command, shell looks for the command in all the directories defined in the PATH environment variable. But in real it goes through the following sequence to reach the above step. Redirection Aliases Expansion Shell Function Shell Builtin Hash table PATH variable

Recover Your Deleted Files In Linux using Scalpel Utility

Have you accidentally deleted an important file because you are in a habit of using “Shift+Del” rather than delete only?? Well don’t panic. There is a utility named as “scalpel” which helps you in recovering the so called “permanent deleted” files. Actually when you delete a file permanently (Accidentally or By Intention) , It doesn’t get removed from your hard disk. It get stored in certain blocks of the storage device and they continue to exist in the blocks unless you overwrite them with another files. This article will talk about utilities that will help you in the file recovery.

Fun With Linux using 5 crazy commands

Linux is generally considered as a geek’s operating system and I am completely agree with it. Linux is not only limited to work only. You can also enjoy a lot while working on it. There are many crazy commands which will bring a big smile on your face. Below we are going to discuss few out of them. 1. Oneko : This utility remembers me of the cat mouse game. Cat chases the mouse pointer regardless of its position. You have to download it from the repository by typing “sudo apt-get install oneko” (without quotes) in ubuntu .Then just launch it by typing oneko . You will see a

Types Of Shells

Shells play an important role in Linux and Unix system. Everything that is happening on your distro is either because of the shell or the kernel. Moreover, a backend shell is initialized as soon as you made a login . There are lots of shells in the Unix and Linux system. Let’s try to know more about them : What is a shell ? Shell is the software installed on your system that works as command-line interpreter i.e. it takes the commands you type, interpret them and gives them to operating system (kernel) through system calls to execute. There are many different shells available to choose from in Linux.

My Gnu/Linux Experience and Real world Myths about it

What is Gnu/linux- well I am not gonna tell you people in detail because you can search about it on the web and millions of answers you will get . In short to say Gnu/linux is an open source operating system. You can Download the source code of all the tools and softwares under this operating system and can modify it according to your needs.

Share Your Data Using Python

Sharing data is a very frequent activity in the computer world. There are many great ways and utilities to share data with other people on network. Python provides a very quick and simple way to share data with people on the network. To share the data within a directory, go to that directory (through cd command) and execute command python -­m SimpleHTTPServer <portnumber> .Please note that the above command is very case sensitive .