Drinks, Food, Music @ Plus91, Bangalore!

Last sunday, on April 7th, 2013, I had the opportunity to attend a bloggers-cum-food review meet at the newly opened Plus91 Cafe Bar, a food and drinks place that call themselves a Fast Food Restaurant, Snack Place and a Café , rightly so. This is another venture from the JSM Corporation Pvt Ltd, the same group that brings HRC, Shiro and CPK amongst others to you.

Considering the heat that Bangalore is facing this year, we started off with a very nice range of mocktails and cocktails including Virgin Mojitos, Virgin Mary, Pina Coladas and Long Island Iced teas. There are few places in bangalore which do a decent LIT and I guess the one at Plus91 is decent enough. We then started with a wide variety of starters ranging from a choice of street foods like pani puri, some chaats and miniature masala papads to veg and non-veg dishes including nachos, baby-corn and chicken preparations. All of them were mouth watering delicious. A special mention to the presentation where they were served in plates which looked like leaf mouldings. For the non-vegetarians, the Buffalo Chicken Wing at this place should be a must try! These were definitely one of the best ones I had in a long time in Bangalore, juicy, rich, succulent ones! Once we were done with the starters and the drinks, it was time for the real deal, the main course. We went in for the various sizzlers including a veg sizzler (a first for me), beef sizzler, chicken sizzler. The sizzlers were pretty good and are definitely worth a visit (and re-visits!)

By now, we were all pretty full, but there is always some place for desserts. We had Gulab Jamuns for desserts and it was one of the pleasant surprises I had. Usually its difficult to find a good “Gulab Jamun” when you go to any “big” place or chain. Not that they are bad, but they are not the desi, Indian feeling Gulab Jamuns. Some are either too big, or too small, or too soft or too sweet. But for once, the one at Plus91 were just perfect! I might already ve been intoxicated by all the fabulous food maybe, but it was the perfect end to a wonderful afternoon! To end it all, nothing else could surmise it up better than this tweet of mine…

Am definitely looking forward to visit this place soon with friends, family and loved ones!

Wired Up!

Long Island Iced Tea

Baby Corn! And the leaf shaped moulded plate.

Ye Nachos mujhe de de Thakur!

Me enjoying the sizzling sizzlers (L) with Santosh(R)

the delicious gulab jamun!

And finally the bloggers/tweeple !


PS: All photos thanks to @uniqgeek‘s post.

More pics at this facebook page.

Fedora laptop setup – Dell Inspiron 1420

I ve been using fedora since FC3. I bought my laptop in 2008 and since then I ve been using fedora on my laptop. I was on Fedora 7 when I first bought my laptop and today am on Fedora 18. After every install of Fedora, I end up looking up for some of the regular problems.. sound, disable hibernate/sleep on lid close, etc etc.

This blogpost is a placeholder for all such efforts going forward:

No Sound problem:

cat /etc/modprobe.d/snd-hda-intel.conf
options snd-hda-intel model=dell-3stack

Stop sleep/hibernate on lid close

$ gsettings list-recursively org.gnome.settings-daemon.plugins.power|grep lid
org.gnome.settings-daemon.plugins.power lid-close-ac-action 'blank'
org.gnome.settings-daemon.plugins.power lid-close-battery-action 'blank'
org.gnome.settings-daemon.plugins.power lid-close-suspend-with-external-monitor false

$gsettings set org.gnome.settings-daemon.plugins.power lid-close-ac-action 'blank'

I also found this..
http://nottooamused.wordpress.com/2012/12/29/fedora-17-and-18-how-to-disable-auto-suspend-when-laptop-lid-is-closed/

Error establishing a database connection – WordPress Error

Well, for the last few weeks I ve been seeing this error quite often on my blog. I didn’t think of it much initially as it used to go away on a mysql restart. However, today I ran into it and was persistent after mysql restarts. So I started digging a bit more and enabled debugging in wp-config


in wp-config.php

define(‘WP_DEBUG’, true);
define(‘WP_DEBUG_DISPLAY’, true);

This didn’t show any error that could help me. I could ve tried enabling further logging in apache to see if that helps

http://codex.wordpress.org/Editing_wp-config.php#Configure_Error_Log

I had tried logging into mysql with the username and password configured in the wordpress config and it worked fine. So I knew those were fine and mysql was running fine. I even restarted httpd a few times to confirm, but it didnt help either.

Then I checked up the mysqld log and voila!

 

101:130113 10:15:33 InnoDB: Database was not shut down normally!
116:130113 16:37:34 InnoDB: Database was not shut down normally!
131:130113 16:39:16 InnoDB: Database was not shut down normally!
146:130113 16:42:20 InnoDB: Database was not shut down normally!
158:130113 16:45:05 InnoDB: Database was not shut down normally!

130113 10:15:32 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
130113 10:15:33 InnoDB: Initializing buffer pool, size = 8.0M
130113 10:15:33 InnoDB: Completed initialization of buffer pool
InnoDB: The log sequence number in ibdata files does not match
InnoDB: the log sequence number in the ib_logfiles!
130113 10:15:33 InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files…
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer…
130113 10:15:33 InnoDB: Started; log sequence number 0 1049991
130113 10:15:33 [Note] Event Scheduler: Loaded 0 events
130113 10:15:33 [Note] /usr/libexec/mysqld: ready for connections.
Version: ’5.1.56′ socket: ‘/var/lib/mysql/mysql.sock’ port: 3306 Source distribution
130113 16:37:04 mysqld_safe Number of processes running now: 0
130113 16:37:04 mysqld_safe mysqld restarted
130113 16:37:29 InnoDB: Initializing buffer pool, size = 8.0M
130113 16:37:30 InnoDB: Completed initialization of buffer pool
InnoDB: The log sequence number in ibdata files does not match
InnoDB: the log sequence number in the ib_logfiles!
130113 16:37:34 InnoDB: Database was not shut down normally!

Version: ’5.1.56′ socket: ‘/var/lib/mysql/mysql.sock’ port: 3306 Source distribution
130124 20:22:26 [ERROR] /usr/libexec/mysqld: Incorrect key file for table ‘./wp_options.MYI’; try to repair it
130124 20:22:26 [ERROR] /usr/libexec/mysqld: Incorrect key file for table ‘./wp_options.MYI’; try to repair it
130124 20:25:00 [ERROR] /usr/libexec/mysqld: Incorrect key file for table ‘./wp_options.MYI’; try to repair it
130124 20:25:00 [ERROR] /usr/libexec/mysqld: Incorrect key file for table ‘./wp_options.MYI’; try to repair it
130124 20:33:04 [ERROR] /usr/libexec/mysqld: Incorrect key file for table ‘./wp_options.MYI’; try to repair it
130124 20:33:05 [ERROR] /usr/libexec/mysqld: Incorrect key file for table ‘./wp_options.MYI’; try to repair it
130124 20:33:05 [ERROR] /usr/libexec/mysqld: Incorrect key file for table ‘./wp_options.MYI’; try to repair it
130124 20:34:44 mysqld_safe Number of processes running now: 0
130124 20:34:44 mysqld_safe mysqld restarted
130124 20:34:47 InnoDB: Initializing buffer pool, size = 8.0M
130124 20:34:47 InnoDB: Completed initialization of buffer pool
InnoDB: The log sequence number in ibdata files does not match
InnoDB: the log sequence number in the ib_logfiles!
130124 20:34:48 InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files…
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer…
130124 20:34:48 InnoDB: Started; log sequence number 0 1049991
130124 20:34:48 [Note] Event Scheduler: Loaded 0 events
130124 20:34:48 [Note] /usr/libexec/mysqld: ready for connections.
Version: ’5.1.56′ socket: ‘/var/lib/mysql/mysql.sock’ port: 3306 Source distribution
130124 20:34:59 [ERROR] /usr/libexec/mysqld: Table ‘./wp_options’ is marked as crashed and should be repaired
130124 20:34:59 [ERROR] /usr/libexec/mysqld: Table ‘./wp_options’ is marked as crashed and should be repaired
130124 20:34:59 [ERROR] /usr/libexec/mysqld: Table ‘./wp_options’ is marked as crashed and should be repaired
130124 20:34:59 [ERROR] /usr/libexec/mysqld: Table ‘./wp_options’ is marked as crashed and should be repaired
130124 20:34:59 [ERROR] /usr/libexec/mysqld: Table ‘./wp_options’ is marked as crashed and should be repaired
130124 20:34:59 [ERROR] /usr/libexec/mysqld: Table ‘./wp_options’ is marked as crashed and should be repaired
130124 20:35:06 [ERROR] /usr/libexec/mysqld: Table ‘./wp_options’ is marked as crashed and should be repaired
130124 20:35:06 [ERROR] /usr/libexec/mysqld: Table ‘./wp_options’ is marked as crashed and should be repaired

So looks like this is what was causing my recent problems.

Once I saw this in the mysql logs, it was a simple fix:


mysql> repair table wp_options;

Found 231 of 230 rows when repairing wp_options

 

And so far its all been good after that :)

The Mayans were right!

The Mayans were right! It is the end of the world. The end of the world as we knew it. With the deads of maestros like Yash Chopra, Pandit Ravi Shankar; others like Neil Armstrong, Michael Clarke Duncan, Whitney Houston, Jaspa Bhatti, Verghese Kurien, Dara Singh, A.K Hangal to name a few; it indeed seemed as if they were all being ported away to “2012″ themed escape pods/ships. Closer home, where everything seemed “theek hai“, the famed IAC broke up to just become yet another political party, even if it be for the common man, while India rallied for her Damini, the Nirbhaya Amanat symbolised the end of an era; and beginning of another one where the boy child needs to be taken care of. And what else to say when The God himself says its time to hang up the boots.

Yes, the world has ended. Everything that begins has an end; and after every end there is a new beginning. The Mayans never said the circle is broken. Their calendar is a circle. Its just the beginning of a new one. Here is to the brand new year, with all its copy lefts and common creatives; see you tomorrow!

PS: Wishing you all a very happy new year!

how to create ipv6 reverse DNS entry

Lets begin with what all we will be covering in this blog post.
We will be covering a lil bit of what is a reverse DNS entry and why do we need it.
We will then cover how to create a reverse DNS entry for two types of ipv6 entries:

    1. A 6to4 ipv6 ip using our own dns server and a 6to4 nro delegation
    2. A tunnel broker ipv6 entry using dns provided by he.net

The reverse DNS look up helps to resolve an ip into the respective host name. It is, like the name says, “reverse” of what the DNS normally do.

DNS is used to convert a human readable name like “hackalyst.info” into its corresponding ip.


host hackalyst.info
hackalyst.info has address 50.57.67.195

reverse DNS entry helps to resolve the ip into a hostname.

$ host 50.57.67.195
195.67.57.50.in-addr.arpa domain name pointer hackalyst.info.

Now, why is reverse DNS required?

One of the reasons nicely explained at godaddy is to fight spam.

Other than that, its always cool to have your ip map to your domain name ;)

There are two ways of creating a reverse DNS entry for ipv6.
1) You can create your own DNS server, point your domain name provider to point to your additional DNS.
2) You can use a free dns service provided by dns.he.net

Lets first go through the first option which is slightly lengthier and more DYI and CLI friendly :P

The wikipedia entry on 6to4 pointed my towards 6to4.nro.net that can be used to create a revese DNS PTR for a 6to4 ip, i.e, an ipv6 starting with 2002:.

The 6to4.nro.net needs dns servers with zone for this reverse delegation. None of the dns servers I host with (domaincontrol.com through godaddy, stabletransit.com via rackspace and he.net) were accepted in 6to4 form. So I decided to setup my own DNS server.

First I setup the DNS name for my DNS (yeah, thats required!) at my existing dns provider.
I am setting up my dns on my own server, hence can simply create sub domains (I used dns1 and dns2 instead of traditional ns1 and ns2) pointing to my own domain. You can create such subdomains pointed to the actual hosts where you will be setting up your DNS. You can set it up on one host or on multiple hosts.

I setup my own DNS server using instructions from devshed forums. Its pretty old but still works.

At the end of configurating the dns server, I initially got an error saying:

_default/67.57.50.in-addr.arpa/IN: file not found

That was because the file name in the config and my actual file name were not the same. After I fixed this issue, still named would refuse to start without throwing any erorrs.

An inspection of /var/log/messages said something about unable to write to the log file.

Jun 24 11:58:22 deltacore named[31254]: the working directory is not writable
Jun 24 11:58:22 deltacore named[31254]: isc_stdio_open 'query.log' failed: permission denied
Jun 24 11:58:22 deltacore named[31254]: configuring logging: permission denied
Jun 24 11:58:22 deltacore named[31254]: loading configuration: permission denied

The way to fix was to change the ownership of the /var/named folder and /etc/named to named :)


#chown -R named:named /var/named /etc/named.conf

And then all was fine :)

After setting the above DNS server, I needed to add the PTR info for my ipv6.
I found http://www.fpsn.net/index.cgi?pg=tools&tool=ipv6-inaddr via searching and headed over to create my reverse PTR configuration for my own DNS.

In the form:
Record type : select ip6.arpa (new standard)
Assigned IPv6 Block: (your ipv6 block)
Admin email:
DNS Server: (DNS Created above)
Secondary server (DNS Created above)

Then it gives the configuration file which you can add to your named.conf and create the reverse zone file.
Like it says at the end of generated reverse zone file, you need to add the AAAA entry in your respective zone file.

After this, it was just playing around to add “my” DNS servers to my “Domain” NS entries with my service provider.
My primary DNS provider is godaddy. I just added my own DNS entries into the NS entry of my domain.

If you do not want to create your own DNS server (or cannot due to resource crunch), you can use freely available DNS servers from he.net.

For this second purpose, I am going to use both the 6to4 ip above tied with your domain and another ipv6 obtained through tunnelbroker.

DNS provided by he.net can be used for managing your domains and these are pretty good in terms of usability.
Add your domain to your dns.he.net account, create your A,AAAA and other entries.

For creating your reverse DNS entry, you need to create the PTR record. Its available under “Additional” menu in dns.he.net.
For finding out the value of your ipv6 PTR, head over to http://rdns6.com/ and enter your v6 ip. The nibble value is what basically goes into your PTR record. In dns.he.net, the above nibble would be added as Name in PTR entry and your domain name in the Hostname.

If you are using a tunnel broker ipv6, you can login to the dns.he.net using same credentials as your tunnelbroker and it would import and delegate the ipv6 provided to you to the he.net nameservers. (I might be wrong here as I ve been using dns.he.net for quite some time and do not remember the initial steps I took).

Once you ve assigned dns names to your ipv6 ips, you can go and assign those ips and respective domain in the dns.he.net. This creates the PTR record for those ipv6 pointing to your domain.

at the end of the day, this is what should be the result of a perfectly working PTR record.

$ host hackalyst.info
hackalyst.info has address 50.57.67.195
hackalyst.info has IPv6 address 2002:3239:43c3::1

$ host 2002:3239:43c3::1
1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.3.c.3.4.9.3.2.3.2.0.0.2.ip6.arpa domain name pointer hackalyst.info.

$ host hackalyst.homeunix.org
hackalyst.homeunix.org has address 106.51.119.133
hackalyst.homeunix.org has IPv6 address 2001:470:5:869:21e:c9ff:fe03:803b

$ host 2001:470:5:869:21e:c9ff:fe03:803b
b.3.0.8.3.0.e.f.f.f.9.c.e.1.2.0.9.6.8.0.5.0.0.0.0.7.4.0.1.0.0.2.ip6.arpa domain name pointer hackalyst.homeunix.org.

So now you know how to create reverse DNS entry aka PTR for your ipv6 :)

cheers!

Google/Youtube’s ISP specific cache/tieups ?

hi,

Today we are going to discuss possible google tieups with local ISP’s to create caching layers in order to deliver better experience to high bandwidth customers.

I stumbled upon the same while browsing one of google’s pages which had an embedded youtube video. Initially it was very slow and I was quite surprised since I am on a 10mbps bandwidth connection and am usually able to stream even HD videos on youtube without any buffering delays. Then I realised that most probably I was going over the ipv6 network (and hence tunneling all the way to US and not getting local content) and hence the delay. I fired my wireshark and indeed I was going over the ipv6 network. I mulled over disabling the ipv6 in router and keeping it only in my dev box when I realised that I can simply disable ipv6 browsing in my firefox :) .

about:config -> network.dns.disableIPv6;true

And am done :)

After doing the above, I reloaded the earlier page with firebug enabled. The embedded video was now playing smoothly without any buffering delays. And then all of a sudden I saw this in the firebug network panel:

o-o.preferred.actbroadband-blr1.v3.lscache3.c.youtube.com

wait what?!
So google has a cache specifically for my ISP?! (I use ACT broadband).
Now that my curiosity was pipped, I decided to do a lil more digging.

[anshup@mouthwa ~]$ host o-o.preferred.actbroadband-blr1.v3.lscache3.c.youtube.com
o-o.preferred.actbroadband-blr1.v3.lscache3.c.youtube.com has address 202.83.22.14
o-o.preferred.actbroadband-blr1.v3.lscache3.c.youtube.com has IPv6 address 2404:6800:4007:2::e

Oh, so they ve also ipv6 enabled it, nice.

whois 202.83.22.14

descr: BroadBand Internet Service Provider, India
..
address: ACT Television
address: # 29/4, 4th Floor, Trade Center,
address: Race Course Road, Bangalore - 560 001

[anshup@mouthwa ~]$ whois 2404:6800:4007:2::e

inet6num: 2404:6800::/32
netname: GOOGLE_IPV6_AP-20080930
descr: Google IPv6 address block in AP
country: AU

Ah, so while the ipv4 cache was coming from my local ISP, the ipv6 cache was coming all the way from australia? So even though google might ve teamed up and linked a deal with local broadband providers, it still is some miles away in getting ipv6 cache to India? Or possibly because am on an ipv6 tunnel rather, it ended up using my tunnel endpoint as the preferred location rather than my original location.

The more interesting part is that Google has apparently created up local caches at ISP ends to help give better speed to the end user. I need to check it up on some other ISP s here in bangalore and then will update the results here.

cheers

Lifetime Roadtax in Karnataka – rates – 2012

So I recentlty bought (or rather booked) my most expensive acquisition so far. A Volkswagen Polo 1.6L. Every dealer in bangalore was quoting a road tax of 15.4%. But no one was able to substantiate it on paper or from the official RTO site. In addition, there was a team-BHP thread where people talked about it being 13% + 10% cess on tax = 14.3% tax total. I also read the same initially, but then found out that the tax is rather 14% (as mentioned in the addendum) and cess 11% (not updated on site but checked with RTO official on phone).

So, if you are here to find out the road tax in karnataka, hit here:

http://rto.kar.nic.in/KMVTA%202010.pdf

I would ve updated the team BHP thread rather than putting a blog post here but team BHP wont accept my “registration”. Your loss team BHP-ians.

Team Winner, Superstar 2011 @ Yahoo!

The wall of fame poster!
Yodel for the Algorithmic Search Bing Transition Team
The Algorithmic Search Bing Transition team maniacally focused on desktop and mobile migration of web, image and video search in 40+ global markets from Yahoo’s YST infrastructure to Microsoft’s Bing platform. The Bing Transition Team in Bangalore specifically took complete responsibility for transitioning image and video search to the Bing platform. The Bing transition represents a first-of-its kind partnership for Yahoo!. It is an inherently complex relationship, extremely difficult technical transition and horizontal cross company project unlike any Yahoo! has undertaken in the past. But this team was up to the challenge, delivering with speed and quality. Successful completion of the Algorithmic Search transition in multiple global markets will save $150M+ annually in capital expenditure costs, allowing Yahoo! to focus on global search experience innovation and beyond, both in our core desktop search business, but also importantly across mobile and tablet devices.

Team Winner, Superstar 2011

How to restore all apps from backup on android

I ve been changing my roms often on my nexus S, the latest being Icecream. One thing thats always been painful was all application restore across roms. Market downloads it all over again but you ve to wait for it. In my case, my apps size about 300 MB in all, abut 130 apps. So I ve to wait for all of them to download all over again.

There are means and ways of taking backup and restores. But being a command line guy, I always was too lazy for them. That’s when I decided to create my own way of backing up the apps and restoring them.

I am assuming you’ll know what it means by adb and mount when you read them. If not, please head over to xda forums or other similar android forums. Another assumption am making is you are already rooted.

How to take backup of apps before flashing:

1) Go to recovery -> mounts and storage
2) mount /data and /sdcard.
3) mount USB storage
4) go to adb shell
5) Copy your app .apk files to the USB storage
mkdir /sdcard/app_backup
cp -rv /data/app/* /sdcard/app_backup

Once you are done, you can make another copy out of the USB storage on your computer as well.

When you are done with your flash, repeat the above (1-4) steps, and copy the files from /sdcard/app_backup to /data/app/
cp -rv /sdcard/app_backup /data/app/

(there is adb push and pull as well, I ven’t tried that. See adb -h for more info and maybe you can try that as well).

6) clear the cache (wipe cache partition)
7) Advanced -> wipe dalvik cache

8) reboot :)

The reboot might take time after the steps above for restore as it will create the dalvik cache out of the apps.
It might look like its stuck on the bootloader screen (CM round circle or whatever is your rom). Give it sometime, go for a coffee. Time will depend upon your number of apps. I did went for a cup of coffee and it was ready by the time I came back.

This is a very rudimentary post on how to restore apps. You can create nandroid backups as well. In that case your /data will be saved as data.ext.tar or something similar. Just untar it and get the files for restoring.

Let me know if you need more help.

cheers
Anshu Prateek

PS: In case you want to unroot your nexus s to a stock image, here is a good compilation of stock images:
http://forum.xda-developers.com/showthread.php?t=1063664