Thursday, September 22, 2011

G-: A Chrome and Firefox extension for Google Plus notification removal

Google Plus is getting popular. One of the killing feature of G+ is the notification bar that works on all Google sites. Since the bar keeps you notified about latest updates on your account, it could also become the reason of distraction while you are at workplace. In order to cater that I made a simple script, called G- which would remove the red notification button and help you to concentrate on your work. YOu can download it from here. It would work on both Chrome and Firefox.

Wednesday, September 21, 2011

PHP: Get first key in Associative Array

If you want to get the very first key in associative array then use Reset and key method to get the key. Reset brings the pointer on first index and key returns the key name. Code snippet given below:

$shapes = array("Box" =>"Square","Moon" => "Circle");
//Set the internal pointer of an array to its first element
//get the first key that is "Box"
$keyname = key($shapes);