Saturday, December 25, 2010

Some dev tips picked up during holidays

Finally got time to continue developing Push Contacts. I've gotten a nerve-wrecking problem while developing with C2DM applications. When the app supposed to get the push message, it didn't respond to it. Looking at the logs I encountered an error stack related to GTalk (with TalkProvider tag). Decided to google the problem and the solution was to sign out of GTalk on the phone.

Ok now a tip related to Google App Engine development. I just added a new feature to Push Contacts which is allowing users to reply to the latest SMS received. I had to retrieve the email of the user the bot is chatting with to find which phone number to send the SMS to. Took a look at guru.appspot.com source code and decided to use xmpp_handlers.CommandHandler. Used this method text_message(self, message) and message.sender supposed to return the sender of a message but instead it returned an IM formatted string. Here is how you can retrieve the email.

Sunday, December 12, 2010

How to get a favicon from a website

Stumbled upon a website with a nice favicon that you want to use? No worries, Google S2 will let you do that. Here is a favicon from android.com

Sunday, December 5, 2010

Fix screwed up keyboard layout on Ubuntu 9.04

Got Gnome desktop installed on TonidoPlug but when trying to vnc to it I realised the keyboard layout is messed up. This is how you fix it:

  1. Kill existing vnc session: vncserver -kill :1 (1 here is the pid)
  2. Edit with: nano /root/.vnc/xstartup
  3. Add this line: export XKL_XMODMAP_DISABLE=1
  4. Rerun vncserver