error while loading shared libraries: cannot open shared object file: No such file or directory

tmux: error while loading shared libraries: cannot open shared object file: No such file or directory

Resolution: Set LD_LIBRARY_PATH to “/usr/local/lib”

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:"/usr/local/lib"

Analytics and conversion tracking for a Google Docs Form

My friend recently asked for a way to track conversions of a Google Docs Form IFRAME that he has hosted on his company’s website. After some digging I figured out a way to accomplish this using a little bit of jQuery.

The trick is to attach a jQuery listener to the .load() event of the IFRAME that contains the Google Form. The IFRAME will load twice. The first .load() event will be the questions, the second .load() event will indicate that the Form has been submitted. The second load occurs because the forms use a standard FORM submit and the content inside the IFRAME will go to a new page, thus triggering .load() again.

$(function () {
    window.loaded = 0;
    // add an id to the <iframe> that you  embedded on your page
   f = $("iframe#googledoc");
   f.load( function () { 
        // first load is for the form.
        // second load means that the form was submitted leading to
        // Google Doc Form  "thank you" message
        if (window.loaded >= 2)
           // Example Google AdWords tracking pixel
           $("body").append(‘<img height="1" width="1" style="border-style:none;" alt="" src=""/>’);  
        // Example Google Analytics Event trigger
        _gaq.push([‘_trackEvent’, ‘category’, ‘action’, ‘label’]);
        // Example Google Analytics page view trigger
        _gaq.push([‘_trackPageview’, ‘/submitted/form’]);

Debug mobile web apps using weinre

I am using weinre to debug mobile web applications. Using weinre I can inspect the DOM on my mobile Safari browser, change CSS on my iphone, and debug JavaScript.

The setup is slightly complex but once you get it up and running you will love it.

Basic steps:

  1. Install node.js
  2. Install npm
  3. npm install weinre
  4. Run weinre, the boundHost flag is your friend
  5. Open the weinre web server console on your desktop — probably http://localhost:8080 (served by weinre-node server)
  6. Copy the weinre SCRIPT tag into the source of the page that you want to debug. (i.e. to be viewed on your iPhone)
  7. Open the page that you want to debug using your iPhone (or other device)
  1. The HTML, CSS, DOM, and JavaScript are now visible on your desktop browser! You can mess with everything on the remote page as you would with the Chrome/Safari/Webkit web inspector consoles.
Syndicate content