How to change Google Plus stream layout to old one

Hi Guys, Well its exciting that Google has updated look and feel for their Social tool called Google+ We used to have a tall news stream and now it more beautiful, more like tiles. Here is a screenshot of the new layout     Interesting part is that you can switch to the old tall way to see your stream. Here is how. Click on the More dropdown as shown in the picture below From the Dropdown you will see the Stream Layout options as shown below From there click on the List Icon and you will have your Old styled Google plus Stream back. I hope that this helps. … [Read more...]

Getting visitors to google plus one your page before showing your locked or hidden page content

Hi Guys, Well you know what, sometimes making use of whats available for creative use makes sense. Google +1 buttons were introduced ages ago and they are serving well for their purpose. We want to be careful as well on how we use them. Following up on my previous blog post which talked about how to use Facebook like to unlock content, this post will talk about how to use a Google +1 button to unlock content. First up is to know if its ok with the Web God called Google. So I believe it is. Anyway you can check out the Buttons Policy here https://developers.google.com/+/web/buttons-policy You should be specifically look at the last paragraph which says Publishers may not direct users to click a Google+ button for purposes of misleading users. Publishers may not promote prizes, monies, or monetary equivalents in exchange for Google+ button clicks. For the avoidance of doubt, Publishers may direct users to a Google+ button to enable content and functionality. When a Publisher directs users to a Google+ Button, the button action must be related to the Publisher or the Publisher’s content. For the +1 button, the content or functionality that is enabled for the user must also be accessible to any of the user’s social connections who also enable it. Anyway let get the ball rolling and lets see what can be done with our Google Plus button. You can create your plus one buttons from the URL below https://developers.google.com/+/web/+1button/ The HTML that is given to us by Google looks like this The Markup If you check the API then you would see what data-annotation  data-width data-callback data-href means, most important bit above is the data-href and data-callback properties data-href is the URL that you are asking your users to like data-callback is the JavaScript callback function. We have defined our callback googlePlusCallBack  above which we will implement soon. Lets add our hidden content to the page Extended … [Read more...]

Getting visitors to Facebook like your page before showing your page content

Hi Guys, Well now that I am doing a bit of RnD on Facebook JavaScript API I found out few interesting things. Mind you that this is the first time I am playing with Facebook API so please if my solution is not good enough then don't forget to leave comments and share yours, so that others can benefit from it. Lets get back to the point without wasting much time. I noticed few sites, can't remember which ones though. I think one of them was something to do with coupons, you have to like their page to see a coupon. The code below will help you with that. First up is to get our markup set up The Markup So the above DIV container is something that Facebook JavaScript library will use to auto generate IFRAME and stuff. That's their thing so I won't get into that in depth. Next up will be converting our above container to a Facebook like button, here is how its done The JavaScript Here is the initializer container that you should have a close look at This code should be placed directly after the opening <body> tag. What we are doing above is to embedding FaceBook JS library from URL //connect.facebook.net/en_US/all.js into our webpage header. and we are initializing a newly created property called fbAsyncInit that FaceBook API will be interested in. If you want to have a close view then open the above mentioned URL in your web browsers. A javascript file will be in front of you and then search "fbAsyncInit" on your page to see how it handles it. Anyway the most inportant part as per my testing goes is FB.init and setting xfbml:true If we are using the XFBML version of the button, we can subscribe to the 'edge.create' event through FB.Event.subscribe. Lets make that change to our above JavaScript Code In web world there is a saying that if you can't demo it then it never happened. So here is The Demo  http://jaspreetchahal.org/examples/facebook-like.html   Most notable part as stated above is … [Read more...]

Clear DNS cache for Google Chrome How to?

Hi Guys, There are times when you make use of local hosts file in windows development to test your websites and while you are testing and changing your hosts file to point your domain to local/production server you notice that sometimes it doesn't work until either you close Chrome and restart it or you wait for default timeout for chrome to refresh its DNS cache. Chrome does that to make things faster to load so that it don't have to fetch DNS data again and again. Chrome is not a browser written by or for kids, so here is the something that Chrome provides to clear DNS cache manually. net-internals webpage is a special URL that you can point your Chrome browser to to load network stack's internal state So in your Chrome address bar just type chrome://net-internals/#dns   Or just click on the above link (open in new tab) Once you are on the webpage just click on Clear host cache button as shown below Once you click on the button you will see that Active entries table where hostname is pointing to an IP is cleared/reset.   Resources http://www.chromium.org/developers/design-documents/network-stack/view-net-internals By the way if you would like to know all internal chrome commands please use this command in chrome address bar chrome://about/ I hope this helps If you would like to add or correct any part of this post please do leave you comments Cheers … [Read more...]

Install node.js on Ubuntu 12+ and test with example server

Now that I've started to learn node.js to a project of mine thus there will be a few articles on node that you will see. And of course I am not an expert on this topic or any actually thus making any amendments will be welcome to improve this post Ok so I am using Ubuntu 12.04 LTS and I think ubuntu works for me atleast for stuff I wanted to do. So after reading many articles online, this is how I successfully installed node on my ubuntu. First we will need to install pre-requisites or dependencies before we can touch node so run the following commands to install Dependencies You will need to install these dependencies first If something goes wrong while installing any of the above then try these steps before you repeat above Installing for current user Change to the directory your want to install node in. For this example lets keep it simple and create a nodejs directory first as shown below If everything went smoothly then its time to get the source from GIT so here are the required steps for that Please note that ./configure will do a check on dependencies and you will see problems in red if something went wrong. Congratulations! Node is now installed and you are ready to rock But just before that I would also recommend you to install node package manager (npm) npm is now installed. npm is a good way to install node modules. But Lets test our node install out Somewhere where you would like to create a new project, just create a new file called index.js (please note that this is just a test thus I am not emphasizing on where and how to do your project structure) I just use gedit to do this Ok inside your index.js put this code in Ok now in your browser address bar either put localhost:8080 or if it is a local network then point your browser to network address of your node server generally starts with 192.168.*.* or 10.1.*.* remember to put 8080 as port number because thats the … [Read more...]

Disable Javascript Internet Explorer 10 How to?

There are times when you want to test few things if JavaScript is disabled at clients browser. I imagine that if you are like me I generally can't think of any online systems without Javascript. It has become such a integral part of what you develop for web. I thought I should put this post together that can help you out. This post will use images to explain what to do. Lets me now show you how to disable javascript in IE10 Step 1 Goto Tools > Internet options or just click on the wheel at top right corner and click Internet Options Step 2 Now goto security tab and click on custom level Step 3 Search for Scripting section under settings as shown below   Check the radio button that has label "Disable" under scripting and that is what is require to disable Javascript in IE10 Why is it so difficult to find that setting. I don't know we better ask Microsoft. What do you reckon? This settings is pretty much same as in IE9 so there are not many changes to this. I wish Microsoft soon will introduce search for their Internet Option popup window just like you can search everything so easily in Chrome :) I hope that this helps and if you have something to say then please leave your comments. Cheers   … [Read more...]

IP Traffic Spy failed to create local socket

Hello, I was trying this awesome util for some basic sniffing to see what local network IP were trying to connect to a specific ports on my machine and I got this error "failed to create local socket" Here are steps I followed I installed IP Traffic Spy It asked me to bind as shown below  after pressing ok, in the status bar you see that error   In my case I was not running my box as an admin so I just have to right click on the IP Traffic Spy executable and select Run as administrator and it worked.   I hope that this helps. In case you end up resolving this some other way please leave your comments so that other can benefit. Cheers … [Read more...]

Cpanel: Install mod_cloudflare

Hello, Now that I've put my site on CloudFlare, hopefully you will see a performance boost and site load time should drop. Guys at Cloudflare directed me to read this document which I think was sort of a kick start on "How To with cloudflare?" You can read that document here http://blog.cloudflare.com/cloudflare-tips-recommended-steps-for-new-use This document helped me a lot in understanding the configurations and how to use CloudFlare control centre. You must be aware that CloudFlare act as a proxy to your server thus all the IP addresses hitting your server would be CloudFlare's IP addresses. Your access logs will start looking weird. You should also read these documents https://cloudflare.tenderapp.com/kb/why-do-i-see-cloudflares-ips-in-my-server-logs-or-site-logs Now this post just tackle one specific problem i.e.     How to install mod_cloudflare under CPanel Follow these steps Use putty or similar tool to connect to your server using SSH. Goto your home directory or goto /usr/local/src We will download the source code for mod_cloudflare now with the following command Above step will download file called mod_cloudflare.c  We will now use apxs (Apache Extension Tool) to install our mod_cloudflare with the following command Make sure that you have not changed your working directory Now we will restart our Apache service with the following command OR  Final step would be to update Apache Configuration and is done with the following command   Make sure that there is no error from any of the above step. If you are not a system administrator then you should avoid doing it. But if you are a a techie and are confident enough then go ahead and do it. I also have compiled these instruction from elsewhere and did it without any issues. You may have to ask your hosting provider to do it for you on your server just in case you don't have root access to your … [Read more...]

Excel 2013 remove duplicates Video tutorial

Hello, While I was working on a spreadsheet where I had to get rid of duplicate values in a column and multiple columns I thought It could be useful for me to do a video on how to remove duplicates so that it may help someone. I hope that you can bear with my English but I assure you that the intentions are to help someone out so putting up with it something you shoudn't complain :) Remove duplicate cell data in Excel 2013 Here is a quick video tutorial httpvh://www.youtube.com/watch?v=C-2MmguSO4w     I hope that you will thoroughly understand how to remove duplicates from your spreadsheet columns. If you would like me to write about it with screen shots please let me know. I thought video will be much simpler. I hope that you learn from this post. If you have something to add to what I said please leave your comments and I will add it in this post. Cheers … [Read more...]