Skip to content

Instantly share code, notes, and snippets.

View harshamv's full-sized avatar
🏠
Working from home

Harsha MV harshamv

🏠
Working from home
View GitHub Profile
function hideAddressBar()
{
if(!window.location.hash)
{
if(document.height < window.outerHeight)
{
document.body.style.height = (window.outerHeight + 50) + 'px';
}
setTimeout( function(){ window.scrollTo(0, 1); }, 50 );
FB.Event.subscribe('edge.create', function(targetUrl) {
_gaq.push(['_trackSocial', 'facebook', 'like', targetUrl]);
});
window.fbAsyncInit = function () {
FB.init({
appId: 'APPID',
Status: true,
Cookie: true,
Xfbml: true
});
FB.Event.subscribe('edge.create', function (response) {
Alert("Hello World! URL Liked!");
});
@harshamv
harshamv / 0_reuse_code.js
Created January 4, 2014 11:04
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@harshamv
harshamv / Gemfile
Created February 24, 2013 20:27 — forked from litch/Gemfile
source 'https://rubygems.org'
ruby "2.0.0"
gem 'rails', github: 'rails/rails'
gem 'arel', github: 'rails/arel'
...