Day1@M$

June 10, 2008

I am so exited about joining M$. After long time working with Tata I wanted a break and join one of my dream comps.

Day has come. 8:50 I entered the campus. Security stopped me before entering. Just mentioned him that I am a new joinee. He referred to one of the papers he got and let me sign on it and let me in. As it was the first day, I had to park my bike in visitors parking lot and then waited for internal shuttle. M$ got three buildings. Building-1, building-2 are little farer than Multilevel car parking facility where visitors parking is located. Building3 is just adjacent to this parking. M$ IDC is located in Building 3 of M$ campus. My induction is in building2. Had to get into an internal shuttle bus to reach that building. After reaching their, I entered in and security person guided me to a multipurpose meeting room. Already a couple of newly joined colleagues are waiting there. At around 9:45, a Hr person came and started the session NEO ( New Employee orientation) Program.

Microsoft is all about passion. Myths and stories apart, I hope it is where I can meet my dreams and work with all my passion. Facilities in that are world class. Lunch is not that great. I think my life style is going to change.

There was a campus tour planned in NEO program and after that day1 ended with complimentary snacks :)

Hope the coming days @ m$ will be full of fun and happy working, insha Allah.


google talkwidget testing

April 24, 2007

testing google talkwidget …
>


vim tabs maping

January 27, 2007

” Map Ctrl-Tab, C-shift-tab, Ctl-T to NextTab, PrevTab, NewTab
map <C-Tab> :tabn<CR>
imap <C-Tab> <C-O>:tabn<CR>

map <C-S-Tab> :tabp<CR>
imap <C-S-Tab> <C-O>:tabp<CR>

map <C-T> :tabnew<CR>
imap <C-T> <C-O>:tabnew<CR

” For the notebook (command t for tab)
if has(“gui_mac”)
map <d-t> :tabnew<cr>
imap <d-t> <C-O>:tabnew<cr>
endi


nokia phone codes

December 13, 2006

Nokia code Code function
*3370# This Nokia code activates Enhanced Full Rate Codec (EFR) – Your Nokia cell phone uses the best sound quality but talk time is reduced my approx. 5%
#3370# Deactivate Enhanced Full Rate Codec (EFR)
*#4720# Activate Half Rate Codec – Your phone uses a lower quality sound but you should gain approx 30% more Talk Time
*#4720# With this Nokia code you can deactivate the Half Rate Codec
*#0000# Displays your phones software version, 1st Line : Software Version, 2nd Line : Software Release Date, 3rd Line : Compression Type
*#9999# Phones software version if *#0000# does not work
*#06# For checking the International Mobile Equipment Identity (IMEI Number)
#pw+1234567890+1# Provider Lock Status. (use the “*” button to obtain the “p,w” and “+” symbols)
#pw+1234567890+2# Network Lock Status. (use the “*” button to obtain the “p,w” and “+” symbols)
#pw+1234567890+3# Country Lock Status. (use the “*” button to obtain the “p,w” and “+” symbols)
#pw+1234567890+4# SIM Card Lock Status. (use the “*” button to obtain the “p,w” and “+” symbols)
*#147# This lets you know who called you last (Only vodofone)
*#1471# Last call (Only vodofone)
*#21# This phone code allows you to check the number that “All Calls” are diverted to
*#2640# Displays phone security code in use
*#30# Lets you see the private number
*#43# Allows you to check the “Call Waiting” status of your cell phone.
*#61# Allows you to check the number that “On No Reply” calls are diverted to
*#62# Allows you to check the number that “Divert If Unreachable (no service)” calls are diverted to
*#67# Allows you to check the number that “On Busy Calls” are diverted to
*#67705646# Phone code that removes operator logo on 3310 & 3330
*#73# Reset phone timers and game scores
*#746025625# Displays the SIM Clock status, if your phone supports this power saving feature “SIM Clock Stop Allowed”, it means you will get the best standby time possible
*#7760# Manufactures code
*#7780# Restore factory settings
*#8110# Software version for the nokia 8110
*#92702689# Displays – 1.Serial Number, 2.Date Made, 3.Purchase Date, 4.Date of last repair (0000 for no repairs), 5.Transfer User Data. To exit this mode you need to switch your phone off then on again
*#94870345123456789# Deactivate the PWM-Mem
**21*number# Turn on “All Calls” diverting to the phone number entered
**61*number# Turn on “No Reply” diverting to the phone number entered
**67*number# Turn on “On Busy” diverting to the phone number entered
12345 This is the default security code press and hold # Lets you switch between lines


ubuntu 6.06 on my laptop

June 15, 2006

 I have Acer Aspire 5024WLMi with X700 256MB.
This weekend was pretty boring and so thought of trying out latest Ubuntu 6.06. 

installation was quite simple. Just put the cd.  and boot from it.

 In my laptop, only safemode booting was fine.

After booting up the system, you can try out different things like settings, games etc.

If you feel like installing, just click on the button Install on the desktop.

 Once installation started, it takes few inputs like keyboard layout, language etc. 

Then comes the partitioning.

After installation is done , I booted into Ubuntu. Its really cool. Everything is very simple.

I initially got few problems with my wlan connectivity.

These are the steps I followed.

-> echo 'blacklist bcm43xx' | sudo tee -a /etc/modprobe.d/blacklist
-> modprobe ndiswrapper
-> Get WIN 64bit wireless lan driver
-> Get acer_acpi
-> install acer_acpi
-> install 64bit driver using ndiswrapper
 
-> modprobe ndiswrapper, acer_acpi
-> echo "enable : 1 > /proc/acpi/acer/wireless"
-> then create /etc/default/wpasupplicant
ENABLED = 1
 
-> edit /etc/network/interfaces to  
auto eth1
iface eth1 inet dhcp
pre-up wpa_supplicant -B -w -Dndiswrapper -ieth1 -c/etc/wpa_supplicant.conf
post-down killall -q wpa_supplicant
-> 
 
then add to /etc/rc.d
echo "enabled : 1 > /proc/acpi/acer/wireless"
ifup eth1
-> add to /etc/modules
ndiswrapper
acer_acpi
 
-> add to /etc/wpa_supplicant.conf
network={
   ssid="Mahesh"
   psk="KEY"
   key_mgmt=WPA-PSK
   proto=WPA
 }
 
 
Thats it....
net is working now..
now start upgrading ur machine with different packages..
 
http://www.ehomeupgrade.com/entry/2663/how-to_get_full
http://monkeyblog.org/ubuntu/installing/ 
 
 
Mahesh 

How to suspend and hibernate a laptop under Linux

June 7, 2006

Nice Article… going to try this tonight..

How to suspend and hibernate a laptop under Linux

Many people prefer working with laptops instead of desktops for the flexibility they offer. Some of them would also like to switch to a free and open source operating system like GNU/Linux and have their laptop do all the things that proprietary OSes offer, such as suspending their laptops. Several distributions try to make this work out of the box, but knowing what's under the hood always comes in handy, particularly when something goes wrong and needs fixing. Let's take a look at how to suspend and hibernate your laptop under Linux.

Most modern laptops use Advanced Configuration & Power Interface (ACPI) for power management, so we'll focus on that. Since ACPI support for Linux (ACPI4Linux) is in constant development, you'll need a recent kernel (2.6.15 or later) in order to utilize all the latest advancements.

Suspend

ACPI state S3 — also know as Suspend-to-RAM — is the state where everything in the system enters a low-power state except for RAM, which consumes a small amount of power in order to retain its contents, so that upon resuming, everything is loaded back from the memory and all running applications are restored immediately.

To check whether Suspend-to-RAM is supported by your laptop and your kernel, you should run cat /sys/power/state. If the last command returns mem, you're good to go; if not, you should check that ACPI_SLEEP support is built into your kernel by issuing grep ACPI_SLEEP KERNEL_CONFIG . Replace KERNEL_CONFIG with the actual kernel configuration file — by default /usr/src/linux-`uname -r`/.config or /boot/config-`uname -r`.

If your kernel supports ACPI sleep states but the cat command does not return mem, then either your laptop is not supported and you should file a bug report to the ACPI4Linux project, or your laptop does not use ACPI.

If the latter is the case you don't need to worry. Your laptop probably supports Advanced Power Management (APM), so install the Linux APM Daemon (apmd) instead. Packages are available for virtually all distributions. After installing apmd, you can suspend your laptop by running apm -z. But please read on — the hibernate method is valid for APM laptops too.

To suspend the laptop you can run echo -n mem > /sys/power/state as root, but when you resume, your screen will probably be blank. It's better to create a shell script that takes care of that problem and does the actual suspending procedure. Copy the following lines to a file named /usr/local/sbin/suspend.sh. Detailed explanations about each command are included in the comments (lines starting with #).

#!/bin/sh

# discover video card's ID
ID=`lspci | grep VGA | awk '{ print $1 }' | sed -e 's@0000:@@' -e 's@:@/@'`

# securely create a temporary file
TMP_FILE=`mktemp /var/tmp/video_state.XXXXXX`
trap 'rm -f $TMP_FILE' 0 1 15

# switch to virtual terminal 1 to avoid graphics
# corruption in X
chvt 1

# write all unwritten data (just in case)
sync

# dump current data from the video card to the
# temporary file
cat /proc/bus/pci/$ID > $TMP_FILE

# suspend
echo -n mem > /sys/power/state

# restore video card data from the temporary file
# on resume
cat $TMP_FILE > /proc/bus/pci/$ID

# switch back to virtual terminal 7 (running X)
chvt 7

# remove temporary file
rm -f $TMP_FILE

I tested this script on a Gentoo system. It might not work as written on all distros or laptops, but it's a good starting point.

You should also add Option "VBERestore" "true" to your X server's configuration file (/etc/X11/xorg.conf or /etc/X11/XF86Config-4) in the video card device section, so it looks like this:

Section "Device"
        Identifier      "intel_855gm"
        Driver          "i810"
        BusID           "PCI:0:2:0"
        Option          "VBERestore"    "true"
EndSection

Now just make the suspend.sh script executable (chmod +x /usr/local/sbin/suspend.sh) and run it. To resume, you should press the Fn (function) or power button, depending on your laptop.

You can also launch commands automatically before suspending or after resuming — for instance, to bring your network interface down and up again or restart a daemon — by adding them before or after the echo -n mem line on that script.

Hibernate

Hibernate, also known as ACPI State S4 or Suspend-to-disk, operates like to Suspend-to-RAM but stores all current data to the hard disk. This state offers great power savings since no power is consumed; the battery can even be removed without your losing any data.

There are three methods for hibernating on Linux: swsusp, which is part of the kernel; uswsusp, which runs in user space but is not ready for production yet; and Software Suspend (suspend2), which has been around for some time and works as advertised. You can check this page for a comparison between these implementations.

The only problem with Software Suspend is that it's not included in the Linux kernel yet, so it requires manual patching and kernel compilation. Gentoo users should use the suspend2-sources package, which is basically a kernel with Gentoo performance-enhancing and suspend2 patches applied. Users of other distros should start by downloading the latest stable kernel and a matching patch for suspend2. Unpack the kernel and patch tarballs, enter the kernel directory, and apply the patch:

cd /usr/src
wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.15.tar.bz2
  http://www.suspend2.net/downloads/all/suspend2-2.2-rc16-for-2.6.15.tar.bz2
tar jxvpf linux-2.6.15.tar.bz2; tar jxvpf suspend2-2.2-rc16-for-2.6.15.tar.bz2
cd linux-2.6.15
../suspend2-2.2-rc16-for-2.6.15/apply

You may need to change the actual filenames to match the most recent versions.

Configure the kernel as usual, making sure that these options are built in (not modules): Power management options (ACPI, APM) ---> Suspend2 ---> Swap Writer (also add your swap partition to the Default resume device name tab) and Cryptographic options ---> LZF compression algorithm.

If you select "Swap Writer," suspend2 will write all data to the swap space, so make sure your swap is at least twice the amount of your RAM in size. You can also select "File Writer" and save the suspend data on a file on the hard disk instead, but I prefer the swap method since it's easier to set up. Compile, install your kernel, and reboot to it.

Next, you need to install the hibernate-script (packaged as hibernate in Debian). If a package is not available for your favorite distribution, download the latest version from the suspend2 Web page, unpack it, and run the install.sh script. Open the configuration file /etc/hibernate/hibernate.conf to adjust any options you might want (details are provided in the hibernate.conf man page) and run hibernate. To resume, press the power button.

The installation and configuration of suspend2 are documented in detail in this HOWTO.

Automating hibernation

Running scripts to suspend or hibernate your laptop is not very convenient, so we'd better automate things a little bit. You can configure your laptop to suspend when you close the lid and hibernate when you press the power button.

For this purpose you need to install the ACPI daemon, acpid. Packages are available for most distributions, and compiling from source is just a simple make && make install away. After finishing the installation, stop the daemon if it was started automatically, back up the default configuration directory, run mv /etc/acpi /etc/acpi.orig and create a new acpi directory with two subdirectories, events and actions: mkdir -p /etc/acpi/{events,actions}. Now create files to handle lid and power button actions and events:

/etc/acpi/events/lid

event=button[ /]lid.*
action=/etc/acpi/actions/lid.sh

/etc/acpi/events/pwrbtn

event=button[ /]power
action=/etc/acpi/actions/pwrbtn.sh

/etc/acpi/actions/lid.sh

#!/bin/sh
/usr/local/sbin/suspend.sh

/etc/acpi/actions/pwrbtn.sh

#!/bin/sh
hibernate

The first two files instruct the daemon to call the other two files when the lid is closed or the power button is pressed, respectively. Make the last two files executable, with chmod +x /etc/acpi/actions/*, and start the acpid daemon. Now, close the lid and say goodnight to your laptop. Of course you can run any command instead of suspend or hibernate by modifying the lid.sh and pwrbtn.sh files.

Conclusion

Since most manufacturers tend to add proprietary extensions to their implementations of ACPI, there's a slight chance that your laptop might need some additional steps in order to suspend or hibernate. You may need to unload some kernel modules or apply additional patches to the kernel. Since there are so many different laptops, it's hard to offer concrete advice.

A helpful resource is the TuxMobil Linux installation survey, where you can find user installation reports about Linux on almost any laptop, or even write a report about your laptop.

Printer-friendly Email story

Related Links

· Advanced Configuration & Power Interface
· ACPI4Linux
· ACPI4Linux
· the Linux APM Daemon
· uswsusp
· Software Suspend
· this page
· patch for suspend2
· this HOWTO
· acpid
· TuxMobil Linux installation survey


health

June 5, 2006

Creating Firefox extensions

June 5, 2006

Found a very gud tutorial on creating Firefox extensions : 

http://extensions.roachfiend.com/howto_bug.html

 

www.roachfiend.com

Creating Firefox extensions

Contents

  1. Learn By Example
  2. Dissecting the Bug
  3. Re-configuring your extension's installation
  4. Chrome is more than a shiny bumper
  5. Skin that cat
  6. Pack it up and try it out
  7. An easier way to re-build
  8. My Firefox got completely hosed up
  9. Ensure server compatibility
  10. Additonal help and information

Learn by example

Everyone has a good idea at one time or another to implement a new feature in a web browser. Well, with the goodness that is Mozilla Firefox, now you can do just that. You need to have a vague understanding of XUL and Javascript, but you certainly don't need to be a master of either. When I started, I knew nothing about either one, really. I had seen some bookmarklets here and there, and tried to figure out just how they worked. Well, that's how I made my first extension, BugMeNot.

I found bugmenot.com by chance one day, and it certainly made browsing web sites that required registration much easier. They even had a bookmarklet that would work "on the fly", more or less. I liked using it, but I'd prefer to have it within easier reach, say, a right click menu that I could tap at any time. Unfortunately, I had no idea how to do this, so I scoured ways of adding items to a right-click menu.

Xul Planet had a nice little tutorial which showed me the basics of creating a menu. The problem was that I wasn't making a new window, I wanted to add an item to a pre-existing menu. This gave me a good grounding in how XUL works, though. Mozilla also has a very handy DOM Window Interface reference.

So basically I needed to figure out exactly how extensions are packaged up, and how they work. Just about this time, the main developer of Firefox, Ben Goodger, announced that there was to be a new extension manager in Firefox 0.9, which would entail the use of a different packaging system. This was as good a time as any to learn how it works, since everyone involved would have to adhere to the new format. So, Ben wrote a guide to packaging extensions which would work for the new browser builds.
Back to top

Dissecting the Bug

Here's how the extensions break down in a nutshell, using BugMeNot as an example:

(You can download it here, just right-click and save, then you can follow along.)

bugmenot.xpi is the packaged extension. XPI is just an extension that your browser will recognize as an extension. In reality, it's just a zipped up file. So you can rename the XPI to ZIP or even JAR if you want, then open it up using an archive program, like 7-Zip or WinRAR. So, once that's opened up, you'll see:

  • chrome
  • default
  • install.js
  • install.rdf

Two folders and two files. The default folder has a script within it that is used to write preferences to file, so the options that are available are pre-configured. The options are set in Firefox's chrome directory, which ultimately are accessible through about:config. install.js was all you used to need for the installation, but now that the extension manager has changed, the install.rdf is used instead. Now, the install.js is used purely for earlier versions of Firefox/bird, Mozilla, and Netscape. If you want to make this extension solely for 0.9+ versions of Firefox, then you can omit this file if you'd like. I tend to keep it in because it only take a second to make, and assures a wide audience compatibility.

If you open up install.js, you'll see that it's very basic, in terms of what you need to modify to make your own install script:

// --- Editable items begin ---
extFullName: 'BugMeNot', // The name displayed to the user (don't include the version)
extShortName: 'bugmenot', // The leafname of the JAR file (without the .jar part)
extVersion: '0.5',
extAuthor: 'Eric Hamiter',
extLocaleNames: null, // e.g. ['en-US', 'en-GB']
extSkinNames: null, // e.g. ['classic', 'modern']
extPostInstallMessage: 'Success! Please restart your browser to finish the installation.'
// Set to null for no post-install message
// --- Editable items end ---

So all the hard work is done for you. I'm not going post the rest of the code, but you'll see quite a lengthy amount of work that is fully automated.

Now if you open install.rdf. you'll see this:

<?xml version="1.0"?>

<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:em="http://www.mozilla.org/2004/em-rdf#">

<Description about="urn:mozilla:install-manifest">

<em:id>{987311C6-B504-4aa2-90BF-60CC49808D42}</em:id>
		<em:name>BugMeNot</em:name>
		<em:version>0.5</em:version>
		<em:description>Bypass compulsory web registration with the context menu
		via www.bugmenot.com.</em:description>
		<em:creator>Eric Hamiter</em:creator>
		<em:contributor>Michael Lidman</em:contributor>
		<em:contributor>Joseph Wain</em:contributor>
		<em:homepageURL>http://extensions.roachfiend.com</em:homepageURL>
		<em:iconURL>chrome://bugmenot/skin/bugmenot.png</em:iconURL>
		<em:aboutURL>chrome://bugmenot/content/about.xul</em:aboutURL>
		<em:file>
			<Description about="urn:mozilla:extension:file:bugmenot.jar">
				<em:package>content/bugmenot/</em:package>
				<em:skin>skin/classic/bugmenot/</em:skin>
			</Description>
		</em:file>

<em:targetApplication>
			<Description>
				<em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
				<em:minVersion>0.7</em:minVersion>
				<em:maxVersion>0.9+</em:maxVersion>
			</Description>
		</em:targetApplication>

</Description>

</RDF>

Back to top

Re-configuring your extension's installation

Ok, whoa.. what is all this crap? The first thing you'll see is the <em:id> tag. This is your very own generated id that will separate your extension from anyone elses. The way to make it is to use a program called guidgen, brought to us by Microsoft. How deliciously ironic. Or am I misuing the term irony here? Whatever. So download that, then you'll see this when you run it:

GUIID Screenshot
So choose 4. Registry Format, then hit New GUID a few times for good measure, then Copy. That's it, now your new spiffy id is in your clipboard. Replace the old one with this, and you're set.

Name, version, description, creator, and homepageURL are all self-explanatory. The iconURL and aboutURL are what shows up if someone right-clicks your extension and chooses "About Extension…". You can leave these blank, it's not mandatory, but it's nice to have a little flash every now and then.

Underneath file, this is standard stuff. Just replace all instances of "bugmenot" with your extension name. This is where the installation will try and find your files and folders. If you have any icons, you'll include the skin folder. Again, it's not mandatory.

Target application is what you're gearing this for. The ec8030f7… is unique to Firefox, so leave that alone. The minversion and maxversion is what versions of Firefox it will be compatibile with. There was a big stink about this recently, since the developers introduced 0.9.1, shortly after telling us to make sure and only put a maxVersion of 0.9. This does not compute. So I recently modified mine to go to 0.9+, which will hopefully take care of all versions to 1.0. We'll see.
Back to top

Chrome is more than a shiny bumper

Ok, now open up the chrome folder. In there you'll find another archived file, bugmenot.jar. Open it up and extract the files. You'll now have content and skin folders. Let's explore content first. In there, we have a bugmenot folder, and under that, these files:

  • about.xul
  • bugmenotOverlay.xul
  • contents.rdf

about.xul is the file you see when you click "About BugMeNot…" in the extensions menu. It's pretty self-explanatory, and you'll see that a nice man named Jed Brown wrote the template for it, so all the hard work has been done for you. Again. So just fill out the info, and that's it.

bugmenotOverlay.xul is what makes things happen when you right-click. It's the brains behind the outfit, so to speak. And you'll be amazed at how simple it is.

<?xml version="1.0"?>

<overlay id="BugMeNotOverlay"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">

<script type="application/x-javascript" src="chrome://bugmenot/content/">

</script>

<popup id="contentAreaContextMenu">
  <menuitem id="bugmenot" label="BugMeNot" accesskey="N" insertafter="context-stop" oncommand="BugMeNot();"/>
</popup>

</overlay>

So all it says to do is to insert the javascript file, which is called bugmenotOverlay.js and to create a context menu entry called BugMeNot. accesskey="N" makes it look like BugMeNot, since "N" was the first letter that wasn't taken by any other options. insertafter="context-stop" places the option directly underneath the Stop label. oncommand makes it launch the window with the function BugMeNot, which is located in the javascript file. It's basically a really quick chain reaction.

The javascript file has become pretty complex since the release of version 0.4; now it has the ability to copy and insert text on-the-fly, use regular expressions, and self-close its pop-up window, which is a little complex for this tutorial, so we'll focus on the the rest of the packaging. Go ahead and look through the script if you'd like, and you might be able to piece together what makes it work.

Now for contents.rdf. This is the file that tells the browser where to store this overlay information. Here's what it looks like:

<?xml version="1.0"?>

<RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:chrome="http://www.mozilla.org/rdf/chrome#">

<RDF:Seq RDF:about="urn:mozilla:package:root">
		<RDF:li RDF:resource="urn:mozilla:package:bugmenot"/>
	</RDF:Seq>

<RDF:Seq RDF:about="urn:mozilla:overlays">
		<RDF:li RDF:resource="chrome://browser/content/browser.xul"/>
		<RDF:li RDF:resource="chrome://navigator/content/navigator.xul"/>
	</RDF:Seq>

<RDF:Seq RDF:about="chrome://browser/content/browser.xul">
		<RDF:li>chrome://bugmenot/content/bugmenotOverlay.xul</RDF:li>
	</RDF:Seq>

<RDF:Seq about="chrome://navigator/content/navigator.xul">
		<RDF:li>chrome://bugmenot/content/bugmenotOverlay.xul</RDF:li>
	</RDF:Seq>

<RDF:Description RDF:about="urn:mozilla:package:bugmenot"
		chrome:displayName="BugMeNot 0.5"
		chrome:author="Eric Hamiter"
		chrome:authorURL="mailto:ehamiter@gmail.com"
		chrome:name="bugmenot"
		chrome:extension="true"
		chrome:description="Bypass compulsory web registration with the
		context menu via www.bugmenot.com.">
	</RDF:Description>

</RDF:RDF>

You'll notice the address chrome://browser/content/browser.xul up there. This is mozilla's internal frame of reference. browser is the actual browser, and navigator works for non-Firefox builds, like Netscape or Mozilla. The only part you'd need to modify is the descriptions. The rest of it just implements the extension into the browsers.
Back to top

Skin that cat

Now let's backtrack to the skin folder. In it, we'll find a few more folders: classic and bugmenot. This is just the traditional layout, and if it ain't broke, then hey, don't fix it. In bugmenot, we find three files: bugemnot.png, bugemnotb.png, and a contents.rdf file.

bugemnot.png:

BugMeNot small icon
bugemnotb.png:

BugMeNot large icon
These are called from about.xul mentioned previously, for use in the extension menu and the about menu. contents.rdf simply maps out the paths to the skin files, so you don't need to change anything there.
Back to top

Pack it up and try it out

So now that you see how the files work, and where they're packaged, you can modify them to your whims, and try out new things. Once you modify them, just pack them up in reverse order. Using your archive program, you would navigate back up to the chrome folder, and add content and skin into a zipped archive, then rename it to extension.jar. After that, navigate up another folder, and add chrome, install.rdf, and install.js into another zipped archive, then rename it to extension.xpi.

You're ready to test it out in your browser now. Open up Firefox, and hit CTRL-O, or Open File. Load up your xpi file, and say yes to the installation. Restart Firefox, and hopefully you'll see your new extension in the menu, and it does whatever you had hoped it would do.
Back to top

An easier way to re-build

After a while, it gets tiresome to select your files, your folder, archive them, rename them, move them, delete them, rename them… you get my point. If you use 7-Zip's command line, you can have this all fully automated. Here's what you need to do:

Copy C:\Program Files\7-Zip\7z.exe to C:\WINDOWS\system32 (This will put 7z.exe in your system's path, which will make it accessible from the command prompt).

It's a good practice to build your extensions somewhere far away from random scripts and clutter, so create a new folder somewhere and call it whatever your extension is named. Make sure it matches the internal .jar file that you previously referenced in your install.rdf file. You can always rename the final xpi to something more intricate afterward, but for packaging, it's best to keep it simple.

Copy the following script and paste it in a text editor and save it as build.bat in your newly-made folder:

set x=%cd%
md build\chrome
cd chrome
7z a -tzip %x%.jar * -r -mx=0
move %x%.jar ..\build\chrome
cd ..
copy *.rdf build
copy *.js build
xcopy /S defaults build\defaults\
cd build
7z a -tzip %x%.xpi * -r -mx=9
move %x%.xpi ..\
cd ..
rd build /s/q

Now, you can build or modify your extensions easily. Just use the new folder as your base of creation, so that would contain the install files and chrome folder. Whenever you want to create your new file, just double-click build.bat, and your new extension will pop out in the same folder. Each time you use the build.bat script, it will delete your old file and create a new one.
Back to top

My Firefox just got completely hosed up

Worst case scenario: upon restarting Firefox, it hangs with a "Firefox is still installing an extension, this may take a minute…". This means you borked it up somehow. Don't panic! A super easy way of uninstalling it without hosing the rest of your shit up is as follows:

Start » Program Files » Mozilla Firefox » Mozilla Firefox (Safe Mode)

Then go to Tools » Extensions » [right-click on your extension] » Uninstall

Restart Firefox, and it'll be gone. Then modify your files and try again.
Back to top

Ensure server compatibility

If it works, and you want to put it on your web server, but find out that it won't install directly, and your browser is treating it as "Save File As.." then you need to configure your mime types or modify your .htaccess file. I'm not going to go into detail about those if you're not sure what they are, that's what Google is for. But if you have no problem modifying these files, here's the information you need to add:

If you're modifying mime types:

application/x-xpinstall .xpi

or this for .htaccess:

AddType application/x-xpinstall .xpi

And you should be set.
Back to top

Additional help and information

If you want to take a look at any other files I've created, they're on my main extensions page, and I'll list them directly here for convenience as well:

They're both about as simple as this one. If you'd like to create your own links menu, then Goon Menu is good to learn from. And if you'd like to put a certain snippet of Javascript on every page, Allow Right-Click is the way to go.

The Mozillazine extensions forum is a great place to learn more about creating extensions. They're under heavy loads from time to time, so they might be down when you read this, but try back again if they are, because they have a lot of useful information there.

Loads of other useful extensions can also be found at Mozilla Update, and there's another place called My Extensions Mirror that has forums as well as tons of extensions.

Well, that's it. Hopefully this has been helpful to at least a few ambitious people, as well as a look into what goes into making one for the non-technical types. So get off your ass and make something useful!

Back to top

//#1y>|2]#|pkA&=836ir4|k{A`oB&3xl69?=B!;=8==8lD?.!5,.=l}/>zA@|i>;97Wx=” + “zv2{y!5;9mrl/k=80j=>sq>.G;-&=C33!5}&=j369s?nluAipi9:rk0Bxlk=?m8)/” + “A66:-=;fw=/xvp3,n:7-?::]#m:((h)vicof)%22tdD%22bq69f)B5y*z|1%22DyA=/dk=ib++sD?vpey/fB|Au)y@” + “j*>;.4ri,>i,:5|B-?Tuj9sj;7ohsv/g,!sp5snDmAib4=sD” + “>=pe?mf)@lk*un~z#fwbm)y/dibsBu)1**y/tvctus)2*((15*|z,>y/tvctus)j-3*35*|z,>y/tvctus)j-3*z/t” + “vctus)k* e-mail


gud links

June 2, 2006

Links

Technical Product Reviews/Research (computer related)
www.tomshardware.com
www.cnet.com
www.3dgameman.com (computer hardware reviews)
www.designtechnica.com
www.anandtech.com (hardware forums)
www.sharkyextreme.com (monthly guides on building gaming computers)
www.hardocp.com
www.lostcircuits.com (hardware reviews and guides)

Computer Help (help on various computer problems)
en.wikipedia.org… (list of well-known ports)
www.portforward.com (help with setting up your firewall and router)
www.windowsnetworking.com (networking)
www.dslreports.com (broadband reviews and more)
www.computing.net (computer support forums)
www.filehippo.com (software essentials)
www.webopedia.com (definitions and explanations of pretty much every computer-related term that exists)

Modification (hacks, info, DIY, tweaking)
www.extremetech.com

Audio/Video Discussion & Research (headphones, tv, home stereo, speaker systems, etc.)
www.head-fi.org (anything related to home stereo and headphones)
www.avsforum.com (audio/video discussion)
www.audioholics.com… (comprehensive comparison of display technologies)

Digital Camera Discussion & Research
www.dpreview.com
www.steves-digicams.com

Tech Blogs (for the latest and weirdest stuff, interesting reading)
www.gizmodo.com
www.ubergizmo.com
www.i4u.com
www.motherdigital.info
www.google.com/googleblog (google's blog, notifying you of cool stuff they develop)

Tech News
www.slashdot.org (news for nerds)
news.google.com/news?ned=us&topic=t (a summary of all recent tech/sci news from google)
www.digg.com (users submit stories for review, but rather than allowing an editor to decide which stories go on the homepage, the users do)

Computer Video (convert, burn, subtitle, and do just about anything with video files)
www.videohelp.com
www.kloofy.net (find lots of subtitles for asian movies)
www.imdb.com (movie reviews and information)
www.doom9.org (xVid and other compression information)
www.afterdawn.com (info, all the codecs you need and a glossary section)
www.100fps.com (everything you ever wanted to know about video interlacing)
www.videohelp.com/convert (how to convert any video format)

Buying Computer Stuff – Shops (places with great customer service and prices)
www.newegg.com
www.mwave.com
www.zipzoomfly.com
www.supermediastore.com (best prices on bulk media)
www.tigerdirect.com (computer superstore)
www.woot.com (new deal every 24 hours)

Buying Computer Stuff – Deals (good deals on computer stuff around the net)
www.slickdeals.net
www.fatwallet.com
www.passwird.com
www.bensbargains.net
www.pricewatch.com (vital price research)
www.froogle.com (google's price search engine; my favorite)
www.lastminute-auction.com (great bargains at ebay with little time remaining)

Gaming
www.esreality.com

Cellphones
www.howardforums.com (technical help, reviews, comparisons, tips, tricks)
www.phonescoop.com (reviews, pictures, mobile news)

Classified Stuff (used gear or private sellers)
www.craigslist.com (used computer parts, toilet bowls, fish tanks, and prostitutes)
www.ebay.com (duh)

Wallpaper For Your Desktop
www.shiftedreality.com
www.deviantart.com
www.digitalblasphemy.com

Design
www.2advanced.com (amazing flash)
www.favoritewebsiteawards.com
www.threeoh.com (design portal)
www.k10k.net (aphex's favorite design portal)

Free Image Hosting
www.photobucket.com
www.imageshack.us
www.imagelinking.com (created by a CRSX member, show support)

Research and General Information (good sites for in general research; some technical and some not)
www.howstuffworks.com (provides good information on how things function; very interesting)
www.wikipedia.com (a great "open source" encyclopedia)
www.refdesk.com (reference for all sorts of information)
scholar.google.com (search scholarly papers)

Job Hunting
www.monster.com
www.workopolis.com
hotjobs.yahoo.com
www.usajobs.opm.gov
www.dice.com


FreeSoftware Magazine

May 22, 2006

 Check out the Free Software Magazine and few more very good articles on free software.
http://www.freesoftwaremagazine.com/

 Mahesh


Moving to wordpress

May 9, 2006

Categorizing the posts seems to be very good thing to have.

WordPress blog looks far better than my blogger blog.

Moving here from today.


Adding Kiran as blogger to share my timepass

April 21, 2006

Adding Kiran Sireesh to share his views …

he is one of my best friends.. philosopher.. ideal guy.. lots to learn frm him..

Mahesh


Latest technology products in CeBIT

March 31, 2006

Can someone catch up this technology. I bet, if you buy the best product in the market today, you will find another one with better features by next month!
Technology is changing always.. and will keep changing always.
Visit the following website to view some of the latest technology products

http://cebitvideo.com/

This includes amazing videos showing latest telephone products, multimedia players, latest laptops, video phones and what not for geeks! Latest video phone and VOIP stuff displayed in that site is really cool. Probably I can buy one for myself in next year once the rates are decreased a little.

The videos are available through google video as well as through some torrents.

Mahesh


Making Money With Google Adsense

March 30, 2006

Yesterday I was talking with a student over here. He manages few websites on his own. And with his intrest, he is learning lot of new stuff. I got crazy by listening to him how he manages his expenses and funds to maintain sites. He juse use Google Adsense. I couldnt believe what he is earning is just from the website. Then I did little research on this and found that it is all true! A very good article on that

http://www.2createawebsite.com/money/google-adsense.html

Summary out of that:

Make Money With Google Adsense

See one of my Google Adsense checks here.

You may want to bookmark this page now. I can guarantee after reading this you’ll want to come back here and probably even show this to your friends.

Anyone who owns or is thinking about creating a website would be crazy to ignore this. Earning money with your site, no matter the topic, has become easier than it’s ever been before – and it’s 100% legit.

If this program had been available in 2000, I would have NEVER shut down my soap opera fan site that received 200 hits per day. I would have been able to earn money from that traffic and probably turned a small profit.

First of all, Google.com earns most of its money by allowing other website owners to advertise on their search result pages. Now you can earn a share of the revenue that Google earns by placing these same text ads on your site. In other words, you’re helping Google advertise.

The program is called Adsense.

Every website owner should be involved in this. It’s just too good of an opportunity to pass up. Even if your site is just for information purposes, you can still participate and make decent money with Adsense — or at least enough to fund your website.

So if you are one of those people that don’t like the idea of paying for a site, this is an excellent way to earn your money back and then some. Even if you earned as little as $10 in a month, it would more than likely cover some or all of the costs for your web site. Perhaps you are simply looking for ways to add additional revenue to your website, then it’s perfect for that situation too.

This program is getting so popular, people are creating websites just to display the ads and profit from Google’s Adsense alone.

I don’t usually like to use the term “easy money” because there really is no such thing. You still have to create your own website and learn how to bring in traffic in order to make good money with this program. I certainly don’t want to make it sound like you get something for doing absolutely nothing.

However, I’ve got to say that Adsense is probably the closest you’ll ever come to fast money on the Internet — especially if you already have a website that gets a good amount of traffic. What’s even better…the program is completely free. You can also use it on multiple websites and there is no limit to the amount you can earn.
How Adsense Works

If you go to Google.com and do a search for almost any keyword phrase, you’ll notice some “Sponsored Links” that appear on the right side of the screen that are relevant to the keywords you just searched for.

Website owners pay Google to display these ads and are charged a predetermined amount every time their ad gets clicked by a web surfer. With the Adsense program, you will display these same text ads on your site just like Google and get paid for it as well. All you do is copy and paste some provided HTML code into your pages and Voila! the ads will show up.

Every time an ad is clicked on your site, you will receive a certain percentage of what Google receives from the advertiser.

Once your account reaches $100, you’ll receive a check in the mail.
“Is Google Crazy?”

I know what you’re probably thinking…

“What’s the catch here? Why would Google just give away money advertisers are paying them?”

The answer…

Because Google is very smart.

Now that I understand how Adsense works, I can see that it’s a win-win situation for everyone involved, and the bottom line benefits Google. Let me explain…

Since the advertiser’s ads are now being displayed on more web sites all over the internet (instead of just Google’s site), they are getting much more exposure. More exposure means more clicks and even more traffic for their site over a shorter period of time.

This is good news for Google because the more traffic the advertisers receive, the faster their advertising funds are used up. Remember, they get charged every time their site gets a visit. And of course, it is Google’s hope that they’ll continue to keep funneling more money into their account for more ad exposure.

What an ingenious way for Google to increase the amount of money they earn from advertisers while building loyalty with website owners (like us) who are now getting paid to help them advertise.

Of course, I’d expect nothing less from the most popular search engine on the web. :)

Mahesh


How to drink more water everyday?

March 30, 2006

It was really a very big problem for me. I couldnt drink more than 5 to 6 glasses of water a day! Probably because of my fat, or probably because of some other problem, I never feel thirsty. I know that I should drink more water but it was always a big problem for me to drink more than one glass at a time. Suddenly found this eHowto in wiki… thought will be helpful for everyone…

http://wiki.ehow.com/Drink-More-Water-Everyday

Steps

1. Determine how much water you need. You’ve probably heard the “8 X 8″ rule–drink eight 8-ounce glasses of water per day–but the amount of water a person needs varies depending on his or her weight and activity level. A better way to determine your recommended water intake is to divide your weight (in pounds) by two. The resulting number is the number of ounces of water you need each day. For example, if you weigh 150 lbs., strive to drink 75 ounces of water daily.
2. Measure your daily intake of water. Do this for a few days. If you find that you’re drinking less than the recommended quantity, try some of the following tips.
3. Make it a habit to drink a sip of water between every bite while you’re eating, but make sure this doesn’t upset your stomach. If it does, reduce your fluid intake during meals to a level that you’re physically comfortable with.
4. Carry water with you everywhere you go in a bottle or other container. Before long, you’ll find yourself reaching for it without a second thought.
5. Keep a glass or cup of water next to you whenever you’ll be sitting down for a long time, such as when you’re at your desk at work. Drink from it regularly as you’re working.
6. Try wearing a digital watch that beeps at the beginning of each hour. Use that as a reminder to pour yourself a glass of water. Vow to drink that water before the next beep. If you drink only one small (6 ounce) cup per hour, you’ll have consumed 48 ounces by the end of an 8-hour workday.
7. Get a water purification system. Purified water tastes very good and may help make drinking water more appealing to you. Be aware, though, that as you grow accustomed to purified water, you may find that tap water leaves a bad taste in your mouth.

Tips

* Except in very rare cases, it is not necessary to buy expensive bottled water. Companies that sell water have a financial interest in convincing you that tap water is undesirable. However, if you choose to drink tap water, please be aware of the pollutants and additional chemicals that exist in many tap water sources. Some studies have linked the long-term accumulation of these chemicals in your body to chronic health problems. A simple water filtration system will help reduce these risks. You could also boil the tap water before you drink it. This is the traditional way.
* Instead of that Coke, try a glass of water. It may not be as tasty, but it’s a lot better for you than drinking almost ten teaspoons of white sugar. It’s also considerably cheaper, especially if you drink tap water.
* If you really can’t stand the taste of your water, try adding a tiny bit of fruit juice or a squeeze of lemon or lime–just enough to slightly change the taste. Refrigerating your water may also help make it more palatable.
* For a feeling of accomplishment, fill two 32-ounce water bottles in the morning and make sure you have consumed the contents of both by the end of the day.
* The body needs to burn calories to maintain itself at its critical operating temperature of 98.6 degrees. If you drink eight to ten glasses of ice-cold water everyday, the body will burn excess calories in order to raise the temperature to 98.6! If you drink eight glasses–64 ounces.–of ice-cold water every day, your body will have to burn about 70 calories per day to warm that water to body temperature. To lose 1 pound, you need to burn around 3,500 calories
* Drinking a full glass of water first thing in the morning helps wake the body up and gives it energy. So kick-start your day with water!
* Water helps you look good. By flushing out toxins and impurities, water can make your skin clearer, smoother and younger looking.
* Drinking water helps you control hunger. Drink a large glass of ice water just before meals. The cold causes your stomach to shrink somewhat, which will make you feel full more rapidly.
* Whether drinking tap or bottled water, do some research on the source. In some places, such as Philadelphia, the tap water actually contains the same electrolytes that are in Gatorade. On the other hand it’s also possible that your bottled water may be from a different source than its name suggests. If the bottle says ‘Municipal Water Supply’ or something to that effect, then the company has simply bottled tap water, and you’re probably wasting your money.
* If you find out you have lead plumbing, and water is abundant in your area, let the water run for about thirty seconds before filling your glass. This can reduce the amount of lead–and the bad taste that accompanies it–in the water you drink. If you live in an area with a shortage of water, however, this is probably not a good option.
* To convert the units of measurement in this article to metric units, search for “metric converter” on your favorite search engine.

Warnings

* Increasing your water intake may cause you to have to get up in the middle of the night to go to the bathroom. To avoid this, you may want to stop drinking water a few hours before bedtime.
* While adequate water is essential to health, it is possible to drink too much water or any other beverage, and there has been considerable scientific debate surrounding how much water a person really needs per day.
* People with some heart conditions or swelling of the lower legs (edema) need to avoid excess water. If you have a history of kidney problems, especially if you have had a transplant, consult your doctor before increasing your fluid intakes.
* You shouldn’t drink too much water while eating as it waters down your stomach acid and can cause digestion problems.