Sunday, April 27, 2014

Best SVN for Ubuntu 10.04 12.04

Simple steps

Follow below 4 steps. thats it

sudo add-apt-repository ppa:rabbitvcs/ppa
sudo apt-get update
sudo apt-get install rabbitvcs-nautilus3
sudo apt-get install python-nautilus python-configobj python-gtk2 python-glade2 python-svn python-dbus python-dulwich subversion meld

Installation on Ubuntu

You can install from our PPA, our tarball archive, or directly from our Subversion repository. Users new to Ubuntu should use the PPA option.

Adding the PPA

Karmic and later

sudo add-apt-repository ppa:rabbitvcs/ppa

Hardy, Intrepid and Jaunty

Add the following line to your /etc/apt/sources.list file (signing key=1024R/34EF4A35):
deb http://ppa.launchpad.net/rabbitvcs/ppa/ubuntu **DISTRIBUTION** main

Installing RabbitVCS

You can use Synaptic to install packages or the command line. If you are using Synaptic, just search for the packages listed below. On the command line, you need to update your software package repositories with:
sudo apt-get update
And install it with:
sudo apt-get install «packages»


…where packages are
  • rabbitvcs-nautilus3 for the Nautilus 3.x extension (use this for Ubuntu 11.10, Oneiric Ocelot)
  • rabbitvcs-nautilus for the Nautilus 2.x extension
  • rabbitvcs-thunar for the Thunar extensions
  • rabbitvcs-gedit for the GEdit extension
  • rabbitvcs-cli for the command line launchers
If you are using the Xubuntu distro, then you probably only have Thunar installed (without Nautilus). Besides rabbitvcs-thunar andrabbitvcs-cli, you also need to install an extra package.
  • thunar-vcs-plugin hopefully, this will included as a dependency for rabbitvcs-thunar in the future.
After installation is complete, logout and log back in for changes to take effect.

From the Tarball

Installing from our distributed tarball is relatively straightforward on Ubuntu. First, make sure you install all dependencies:
sudo apt-get install python-nautilus python-configobj python-gtk2 python-glade2 python-svn python-dbus python-dulwich subversion meld
Then download the tarball and from the top folder type:
sudo python setup.py install --install-layout=deb
Once that is done working, look in the clients folder and read the README file for each client/plugin to learn how they are installed.
Note: In order to get the menu to show up in the Nautilus right click menu, you may need to restart Nautilus which may require you to log out and log back in of your desktop environment (see the FAQ).

Ubuntu 12.04 Network Manager not working

You may be missing the firmware.


sudo apt-get install firmware-b43-lpphy-installer

Friday, August 30, 2013

Facebook Story Tagging Simple Example






Steps to create Story Tagging Simple Example

0. Create an app at https://developers.facebook.com/apps - my app name is localharshal

1. Create a folder structure similar to below and place it on a server - actual server is needed for tagging.





2. On facebook create an action i have created tango and using object - myobject.



Create an object which inherits from Business - action tagging with place.





The markup which we have used below can found at OpenGraph -> Types ->Click on edit object




3.  Create a self hosted object myobject.html


<html>

<head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# localharshal: http://ogp.me/ns/fb/localharshal#">
  <meta property="fb:app_id" content="your appid" /> 
  <meta property="og:type"   content="localharshal:myobject" /> 
  <meta property="og:url"    content="{URL where the object is hosted}/facebooktest/myobject.html" /> 
  <meta property="og:title"  content="Pune" /> 
  <meta property="og:image"  content="https://fbstatic-a.akamaihd.net/images/devsite/attachment_blank.png" />
  <meta property="localharshal:location:latitude"       content="37.41452468098636" /> 
  <meta property="localharshal:location:longitude"      content="-122.07739323377609" /> 
  <meta property="business:contact_data:street_address" content="Pune" /> 
  <meta property="business:contact_data:locality"       content="Hinjewadi" /> 
  <meta property="business:contact_data:postal_code"    content="Sample Contact data: Postal Code" /> 
  <meta property="business:contact_data:country_name"   content="Sample Contact data: Country Name" /> 
  <meta property="place:location:latitude"              content="37.41452468098636" /> 
  <meta property="place:location:longitude"            content="-122.07739323377609" /> 
  </head>
  <body>
  omg
  </body>
  </html> 



4. Create a file og.php 

<html>
<head>
<title>Open Graph Getting Started App - og.likes</title>
<style type="text/css">
div { padding: 10px; }
</style>
<meta charset="UTF-8">
</head>
<body>
<div id="fb-root"></div>
<script type="text/javascript">
  var fbAppId = 'your facebook id';

  window.fbAsyncInit = function() {
    FB.init({
      appId      : fbAppId,        // App ID
      status     : true,           // check login status
      cookie     : true,           // enable cookies to allow the server to access the session
      xfbml      : true            // parse page for xfbml or html5 social plugins like login button below
    });

  FB.getLoginStatus(function(response) {
    if (response.status === 'connected') {
    var_dump(response);
    } else if (response.status === 'not_authorized') {
    
      login();
    } else {
   
     login();
    }
  });
  };

function login() {
  FB.login(function(response) {
    if (response.authResponse) {
      var_dump(response);
    } else {
      // cancelled
    }
  }, {scope: 'publish_actions'});
}

  // Load the SDK Asynchronously
  (function(d, s, id){
     var js, fjs = d.getElementsByTagName(s)[0];
     if (d.getElementById(id)) {return;}
     js = d.createElement(s); js.id = id;
     js.src = "//connect.facebook.net/en_US/all.js";
     fjs.parentNode.insertBefore(js, fjs);
   }(document, 'script', 'facebook-jssdk'));





function postLike() {
FB.api(
 'me/localharshal:tango',
 'post',
 {
   myobject: "{URL where the object is hosted}/facebooktest/myobject.html",
   place: "{URL where the object is hosted}/facebooktest/myobject.html"
 //  place: "https://foursquare.com/v/computer-history-museum/4abd2857f964a520c98820e3"
 },
 function(response) {
 if (!response) {
          alert('Error occurred.');
        } else if (response.error) {
          document.getElementById('result').innerHTML = 'Error: ' + response.error.message;
        } else {
          document.getElementById('result').innerHTML =
            '<a href=\"https://www.facebook.com/me/activity/' + response.id + '\">' +
            'Story created.  ID is ' + response.id + '</a>';
        }
 
 }
);
}




</script>
<div>
<input type="button" value="Create a your story with tagging" onclick="postLike();">
</div>
</body>
</html>

5. You should see a story similar to below in your activity logs


Trouble shooting

1. localharshal is my app name
2. Tango is my action name.
3. Myobject is my self hosted object name. 

You have to use your settings.