Saturday, December 15, 2012

iForce - Sublime text plugin for salesforce development.


I wrote a small plugin for sublime text to develop salesforce. I'm glad to share one of my idea to project execution.



My recent project was developing a mobile app (jquery mobile) for salesforce. I find it is tedious to use eclipse/Force IDE for modifying single APEX page, the rich-text editor with syntax highlighting provided by salesforce web interface is not very helpful.

As "productive" developer I was looking for other options, I found ForceDotBundle for textmate and Mavenmate for Sublime text.

I settled with ForceDotBundle atlast, as I figured I don't need all the features of Mavenmate. I could not recommend any to my fellow teammates, who use Windows as their primary development machine. As far as I know there is no real alternate to Eclipse/ForceIDE for Windows users.

So I saw an opportunity to learn to develop sublimetext plugin. My initial feature set were

✔ Basic Authentication
✔ Get latest version of source files from salesforce org
✔ Push local changes to salesforce
✔ Auto syntax highlight/color
✔ Snippets (boilerplate code for new apex class/trigger/page)
☐  Keep changesets in local git repo
☐  Option to run SOQL query without leaving sublimetext
☐  Get fields of a an object by selecting object name.
☐  Execute selected code and return results (Developer console)

I settled with deploying code with ant, as my original idea of calling webserivce to push/pull/execute would require good knowledge of python which I lack at the moment.

iForce - Source | How to - iForce


Thursday, December 13, 2012

Rest In Peace


We received an unusual call at 4am on 6th only to know my Uncle and Aunt are no more. Suicide at the age of 70+ is not an easy decision, it has been a week and I couldn't digest the news.

They were always had taken great care of me. Though I don't meet them often, I have always treated as a rock-star when I do.

My dad has shared great stories about their life and their hard-work. I have always admired them and still do. I can only wish they find peace which they couldn't find it here in this life.

They worked very hard till last two hours of their life. As a suppliers of most of the my towns' restaurants, their work start at 1am. They were waking up at 1am for more than 50 years.

My dad is still heartbroken, I can understand how he feel they were his buddies for more than 30 years. Also it is 3rd suicide incident within our close friends and family which claimed total of 4 lives.

May the peace be upon them.


Monday, August 27, 2012

Failed to get brightness for displayID


If you are experiencing frequent disk I/O and your console is full of

25/08/12 4:30:19.506 PM ALSPlugin 235.55[62]: Failed to get brightness for displayID 0x042731c0

Chances are you are using a non-apple display with "Automatically adjust brightness" in System preferences -> Display

Uncheck and save precious CPU/Disk I/O cycles


Image from: http://apple.stackexchange.com/questions/61080/auto-brightness-in-mountain-lion

Sunday, August 26, 2012

How to install Grease monkey scripts on Google Chrome 21


Chrome updated its policy to not to install extensions and scripts outside of Google webstore by default. (Gatekeeper, everyone wants to be the police)

After using Google reader without my OSX lion mod for over a week of frustration, I was motivated to find a solution. Know what! it is simpler than I thought.

Drag and drop the file in chrome://extensions tab to install.


  • Download the extension file from the website and save it to your computer.
  • Click the wrench icon on the browser toolbar.
  • Select Tools > Extensions.
  • Locate the extension file on your computer and drag the file onto the Extensions page.
  • Review the list of permissions in the dialog that appears. If you would like to proceed, click Install.


Link: Mafia wars loot lady | How to geek


Thursday, August 16, 2012

RIP - My Macbook Pro (13" Mid 2010)


TL;DR If you have a Apple Portable within the 1yr manf. warranty, stop reading and go and buy Apple care if you haven't already.



My Macbook pro is dead since Aug 1. It haven't seen its 2nd year anniversary. It is heartbreaking to know that repairing GPU cost almost 60% of the price of new macbook pro.

The worst thing is I couldn't switch to Windows/Linux.

More Info: Apple.Stackexchange | Mac Observer

Friday, January 20, 2012

Idea Vault: iBooks 3.0

The idea supposed to be named as iBooks 2.0 well it is taken by Apple yesterday :)

The original pointers of this idea from my notebook are


  • Margin notes - Show annotations & notes inline with the page
  • UI similar to diff programs
  • Swipe to bring the annotations layer

I got this idea when reading the book "Einstein His Life and His Universe", author explains Einstein fills the margins with scribbles. Wait! most of us did the same at least in our time?

Thus far I didn't get a page to explain this idea, at least until yesterday where Textbooks were introduced by Apple. I've used the sample from Algebra 1 textbook.

iBooks 2.0

Exercise page



Quiz page


I find the exercise and quiz pages are too dumb. Other than the fancy bubble like animation on quizz and Examples provided in the Quick review.


iBooks 3.0
  • Same exercise page with each questions tappable.
  • Tapping on a question brings the margin space for doing the exercise
  • Use colors to diff formula, steps and answer (Easy to follow when reviewing before the exam)
  • Save to Notes. Should be available in Notes and highlights section of current workflow as well.
  • Mark the question as solved. 
  • Tapping on it again displays the solution, you could also rework to practice before the exam.
  • Quiz page should also features the same functionalities. 
  • Share the exercise/quiz/notes with friend. So they can view my solution on their books. (NOT to Facebook and Twitter for the sake of education)





Add share instead of Save note. Notes should be saved automatically without user action.

Friday, January 6, 2012

Developing iOS application for salesforce [How to]


Here are the collection of snippets to do CRUD operation with ZKSforce (Force.com toolkit for iOS).

Remember this is a SOAP based API, there is a new alternative library available from salesforce called MobileSDK for iOS.

Create new record/ add new obj in Salesforce




To update SF object



Delete or Undelete object




Fetching objects/records from Salesforce




Attachment (adding binary objects to SF attachment)





References