You should not use Airtel

No one likes to be controversial about this. I would definitely agree with Airtel and it’s “just awesome” service to me. Now, I rather would not at all. “Airtel has me on the worse side”. Looking at this agreeable GPRS scheme, “Nightly Month@Rs. 89”, displayed at *567#, is that you get 100MB during the day free and 2GB free from midnight to early morning eight, with validity for thirty days. Convincing myself to go for this scheme(because as of now I live without the Internet), I happily activated it on my Airtel number. First day, 200MB was downloaded, no charges whatsoever, fine. Last night, 357MB was downloaded, which is numerically less than 2048MB, was downloaded, they charged me Rs. 62.35. So now, whatever happened to the free 2GB downloads in the night? I’ll tell you what happened to it: Airtel had a big stick up in their a**. Convincing some of my friends to go to some other provider won’t be easy.

Of course, your all wondering what happened to the Technical Support available at 121, well all I now hear is “Please SMS AIRTEL to 121 for all your balance related queries”, instead of the friendly, “Please hold while I transfer the call, blah blah blah”.

The covenant that I make,

“Thou shall and not think deepest in their thoughts about using Airtel and its services, for thou shall be doomed afterwards.”

You should not use Airtel.

Easily Sort Your Music Library

Here is a very simple script to sort your whole music library according to their artists,

#!/bin/bash
# sortMusic v0.4
# make sure this script in in the music directory and you execute this script from there
# know issue: will display many errors, but it does it fine, those errors are not to be bothered about
# still needs a workaround
echo "$(ls -l *.mp3 | wc -l) Files will be sorted according to their Artists"
echo "Make sure all your song artists are correct, will wait for 3 seconds..."
sleep 3
for i in ./*; do
	artist=$(mp3info "$i" | sed -n 's/Artist: *//p')
	if [ -d "$artist" ]; then
		mv "$i" "$artist"
	else
		mkdir "$artist"
		mv "$i" "$artist"
	fi
done
# To move all the incorrect id3 artists
mkdir "Z Singles Z"
mv *.mp3 "Z Singles Z"

# That was very simple, wasn't it?

Just make a file called sortMusic-v0.4 in your main music folder, paste the above code into that file, then do $ chmod +x sortMusic-v0.4 and then do a $ ./sortMusic-v0.4 in the music folder. Please download mp3info as this uses that package. Please note that this is very case-sensitive, so if your artists are same but differ in case, it will make a new directory for that one, so please take care until I have a workaround for this.

NON-Standards Compliant C++ with Mumbai University

Mumbai University fails to keep up with the ever-evolving C++ syntax. Making Turbo C/C++ as their prescribed IDE, Turbo C/C++ is ancient and will not compile with the present syntax of C++. Here is the simplest example:

#include <iostream.h>
#include <conio.h>
void main()
{
	cout << "Hello";
}

The above code, when compiled with g++ 4.3.4, will give the following errors, but with Turbo C/C++ will compile and run just fine:

firstApp.cpp:1:22: error: iostream.h: No such file or directory
firstApp.cpp:2:19: error: conio.h: No such file or directory
firstApp.cpp:4: error: '::main' must return 'int'
firstApp.cpp: In function 'int main()':
firstApp.cpp:6: error: 'cout' was not declared in this scope

Here is the same code, but following the correct syntax:

#include <iostream>
using namespace std;
int main()
{
	cout << "Hello";
	return 42;
}

will compile and run just fine.

Argggg!!! This never ends! They even introspect on Valid XHTML and CSS standards!

Managing Your Gentoo [“Sort-Of” Easily], Tips, and More

***This article has been placed under constant expansion. So keep a check on it!***

Law #1: If anyone tells you that, “To administer a Gentoo Build is easy”, tell him/her to go f*** off. Ofcourse, if your an expert at it, then it’ll be an exception for you. Yes, it really is easy if you understand what you are doing, unlike pulling your hair out.

Gentoo offers the most that you can think of getting out of any GNU/Linux box, and that is the very fact why administering it often becomes a headache. You will at first curse portage(the package manager), but eventually will realize that it’s the most superior one out there. Okay, I hate introductions, let’s get to work.

Required Gears:

  • Gentoo Build from stage3(stage3 is the best method to install Gentoo)
  • Some patience for reading

Package Managing and Tune-Ups:

You’ve probably noticed that compile time is long, so, if you have like >1GB RAM, you can opt to compile in RAM. Here’s how you do this in /etc/fstab. Add this line there and do a “# mount /var/tmp/portage”.

none /var/tmp/portage tmpfs nr_inodes=1M,size=900M 0 0

Portage does all its compiling in /var/tmp/portage, so if we have that in RAM, read/write speeds would be better. Again, you may also try out ccache, but it will cause some build to fail. For me, it failed to compile mono as it had some error in the cached libs. Now we have faster build time. Let’s make the searching and “Calculating dependencies…” happen a lot faster. For this, we’ll create a reiser4 loopback filesystem which will also compress the huge tree into only 220MB max. This is just done by making the blocksize a bit smaller. I prefer reiser4 as it’s extremely good with small files(you will have to patch your kernel for reiser4fs, so head out here: Patching the Linux Kernel for reiser4 support).

# dd if=/dev/zero of=s-port bs=1M count=250
# mkfs.reiser4 ./s-port
# mv ./s-port /usr
# mount -o loop /usr/s-port /usr/portage/
# emerge-webrsync

Note: You’ll have to relocate your distfiles, as this images is only 250MB and you cannot store distfiles in this image. Refer to the make.conf

You can add the following line to /etc/fstab to make it mount on every boot.

/usr/s-port /usr/portage reiser4 loop,noatime 0 0

Now, we should have a faster portage. In case you have a lower bandwidth, I suggest you to use the delta method of patching the tree. The package is called “app-portage/emerge-delta-webrsync”. Go ahead and install it. It will not download the whole tree everytime you want to sync, but only fetch patches(usually less than 2MB) and patch up the tree. It may hit your head that emerge –search is a bit slow. So then install “app-portage/eix”. It’s a common tool for searching as it displays results in less than 10 seconds.

Putting the next thing bluntly, many users are often very frustrated when portage complains about “masked” packages. For this, install “app-portage/autounmask”. The syntax for autounmask goes like this: autounmask category/package-version
# autounmask x11-wm/compiz-fusion-0.6.0
.
Continue reading “Managing Your Gentoo [“Sort-Of” Easily], Tips, and More”

[HOWTO] Create a hidden loopback device in a .jpg file

Well, I’m sure that you are definitely curious about how do you do this. Let me tell you this, it’s really simple.
Pre-requisites:

  • Image File(any format will do or even any file will do)
  • Linux(I’ve only tested it on this platform but I guess Mac would also do)

Let’s get started, shall we?
First create a standard loopback device.

dd if=/dev/zero of=hiddenimage bs=1M count=10

Let’s see what does this do:
It creates a file called “hiddenimage”, with it’s size as 10MB.
Then, create a filesystem on it.

mkfs.ext4 hiddenimage

mke2fs 1.41.8 (11-July-2009) hiddenimage is not a block special device. Proceed anyway? (y,n) y Filesystem label= OS type: Linux Block size=1024 (log=0) Fragment size=1024 (log=0) 2560 inodes, 10240 blocks 512 blocks (5.00%) reserved for the super user First data block=1 Maximum filesystem blocks=10485760 2 block groups 8192 blocks per group, 8192 fragments per group 1280 inodes per group Superblock backups stored on blocks: 8193 Writing inode tables: done Creating journal (1024 blocks): done Writing superblocks and filesystem accounting information: done This filesystem will be automatically checked every 39 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override.

Continue reading “[HOWTO] Create a hidden loopback device in a .jpg file”

EyeCandy for your VIA Unichrome

Not until recently, did I find out about the EXA acceleration method of xorg. It’s the new acceleration architecture. Well, I tried it out, read that it had chances of decreasing the responsiveness of my computer, but hey, there’ no harm in trying it. So, got to their documentation, followed through the steps, and wow!!! The 3D graphics work very well. It didn’t even slow down my computer one bit. Let’s take it to a higher cliff this time. Installed avant-window-navigator, and that too works great. Now, even a bit higher… the compiz-fusion test. I’m not sure if compiz would work on my VIA card, with its high 3D quality, but I’m eager to try it out this evening. So, all the users still using VIA Unichrome cards, don’t give up hope! 3D does work on with the EXA acceleration. Testing will begin this evening with compiz-fusion…
Avant Navigator on my Machine
UPDATE: Running compiz results in a “White Screen”, where the cursor is available, but the rest is white. I think I’m happy with shadows, transparency, fade in/out and avant navigator.

Sabayon fOuR oH

Sabayon
Based on Gentoo,
Sabayon 4.1, tells me:

  • Great performance with less RAM(though you need like 1GB RAM for it to work well enough).
  • Package Management System is absolutely fantastic, with it’s new “Entropy”.
  • Totally the perfect distribution.
  • A fine distribution for the newbie or the expert.

This is what a critic would say:

  • Definitely better than the leading Ubuntu, like a total drift between Ubuntu and Gentoo.
  • It has many other applications that do the same thing as the main one does.

It’s an absolutely fabulous Linux Experience ever. I would rate it 9/10. Highlighting one of its features, is that all small applications can be just installed from it’s binary form, while high-end application, like openoffice, can be compiled using portage, to provide maximum efficiency. What’s more? It’s speedy and a completely out of the box experience.

Finally it all pays off!!!

Yipee!!! I got 78.86% ! All the hardwork for five months pays back.

Indian Certificate of Secondary Education Examination 2009
Index No T/6563/015
Name JUDE BENEDICT PEREIRA
School ST. MARY’S HIGH SCHOOL,MOUNT ABU
Date of Birth 28/10/1993
Subject Percentage Marks
ENG 78
HIN 72
EED 86
HCG 76
MAT 74
SCI 72
CTA 94
SUPW A
Result * PCA

[HOWTO] Dynamic Plugins for WordPress

Problem: Installed the hemingwayEx theme. Looks great, but the pagination doesn’t work well without the custom hemingwayEx pagination plugin. I got that installed. The hemmingwayEx theme looks cool when it displays two posts per page. The plugin worked well except that for my other two themes, displayed two posts per page. I posted a topic at WordPress Forums. No results.

Solution: Just at the beginning of the hemingwayEx theme, I modified it to create a cookie, like this:

<?php
if(!isset($_COOKIE["wptheme" . COOKIEHASH])) {
		$expire=time()+3600;
		$ctheme="hemingwayEx";
		setcookie("wptheme".COOKIEHASH, stripslashes($ctheme), $expire);
}
?>

Continue reading “[HOWTO] Dynamic Plugins for WordPress”

P&P Lava Lamp nav for your WP Blog

After two days of having intense jolts given to my head, I finally got the lava lamp navigation working! The orignal idea is from G. Marwaha’ Blog and Cory’s Place. By compiling the two articles, I have a clean way to implement it in probably any wordpress theme. I struggled at this one… but where there is a will, there is a way. This has been tested on the wordpress default theme and the subtleflux theme. You can see it live at my developmental theme. This is also for the lazy man, the quick “copy & paste” method.

So let’s get started, shall we?

Download this zip file containing the jQuery files for Lava Lamp Menu Unzip the files in your theme direcrory.

Continue reading “P&P Lava Lamp nav for your WP Blog”

Simple Steganography

Wanna hide that information and private things you don’t want your buddies to see? Here is what is called simple steganography. Steganography is the master of black arts. Nobody can ever suspect that there is a simple, easy-to-find drawer in one of your pictures. This works with .png files as I didn’t try it with any other. If the trick works on other file types, please let me know. All set to go? You need a GNU/Linux terminal or a Mac terminal to do this. Someone please post ways of doing this in Windows!
The Trick:
We have a file called “Secret Song.mp3”. We want to hide this into an image file. Let’s assume that our image file is called “Landscape.png”. First, compress the “Secret Song.mp3” into the .zip type compression. Then type the following in the shell:
Continue reading “Simple Steganography”

St. Mary’s High School, Mt. Abu

I have spent almost five years at this school.

St. Mary's High School, Mt. Abu a. k. a. The Paradise

It was just like a second home to me. With facilities like a swimming pool, basketball courts, football grounds, a multimedia, etc., we not only grew up to be pure men but also with a range of hobbies that we do. There are several competitions that are held on a regular basis, that keep renewing that spirit of enthusiasm and anxiety. There were outdoor games almost everyday, save the Wednesdays, Saturdays and Sundays. We had always learnt to live by each other’s weaknesses and strength.

Some of our favorite “hotspots” for the evening walks were Flaggy, Plummy, Lime Orchard, Tiger’s Path and Shalgaon. Overnight Camping was a must for the class tens, their final year. The overnight picnic was filled with fun. Continue reading “St. Mary’s High School, Mt. Abu”

Cold War Cools Down

At the end of the exams, we all say to ourselves Come what may… The incident at Banglore took us by a complete surprise and then the Geography exam was post-ponded later, leading to an increase in tension and also causing problems in travelling. We finaly had to travel by bus, which ofcourse was very, very irritating. 

The long awaited holidays have finally begun, each moment being like a million years. Let’s just say that all went well and so, enjoy the present, forget about the past and don’t bother about the future.

ICSE 2009 of St. Mary’s High School, Mt. Abu
Batch of '09

Exams finally round the corner!

Finally, the long awaited exams… the ICSE boys of St. Mary’s High School, Mt. Abu retreat back to the campus early on the the 6th day of the glorified month February for the teachers give final instructions and refine the students in their knowledge… Then follows the Board Exam on 2nd March, 2009. The exams end on 30th March and I am free from the ill air of the exam dungeon! Hope for the best…