Tuesday, August 6, 2013

exposing XPCOM C++ interface on a DOM

So there was a need for me to write a C++ add-on for Firefox and make it possible to use it's functionality from the webpage Javascript code.
Firefox provides XPCOM object model which can be employed by add-ons. Unfortunate to me, the majority of information is sparse and highly out-dated and this post is dedicated to all this pain developers like me experience trying to understand and assemble these pieces of information together. One should also note, that XPCOM is rapidly changing interface and with time passing, the code from this post can no longer be a working example.

The main problem was the privileges - one can't simply execute XPCOM C++ code from the webpage.
I've tried numerous different approaches which failed to work, unless all the new knowledge in my head produced one idea which appeared to work as I expected.

Saturday, May 25, 2013

ios xcode sample project

For a long busy time, finally had free days for professional self-improvement and decided to start new iOS app project. Once created, realized that it's going to take plenty of time for configuring it according my tastes. logic unit testing, app unit testing, auto-generation of documentation, setting up the logger, storage, etc. So, as I'm a fan of optimizations, I decided to create a sample Xcode project which can be just cloned from a rep and easily configured to suit my needs in.

Here is the brief description of features for sample project:

  • configured logic and app unit testing (with OCMock library pulled from actual rep)
  • configured documentation generation using Appledoc
  • configured PTNLogger and PTNStorage
In order to deploy new workspace for a project, follow these commands:

$ git clone https://github.com/peetonn/PTNSampleProject SuperApp
$ cd SuperApp
$ ./setup.sh SuperApp

That's it, SuperApp project is ready for code! 

Here you can find it and enjoy using it! Any suggestions, comments, discussions are more than welcomed!

Saturday, April 13, 2013

"grey screen of death" defeated.

yesterday noticed some slow-downs in my mac and decided just to reboot it. ordinary mac boot - grey screen, sound, apple logo and wheel... supposed to go away after a while. but 40 minutes was not enough for loading. googling awhile and trying suggested approaches, even magic dances, all resulted in zero.