Skip to content

Instantly share code, notes, and snippets.

View harry1989's full-sized avatar

Sriharsha Sistalam harry1989

View GitHub Profile
@harry1989
harry1989 / gist:8422384
Last active January 3, 2016 06:28
Binding this in javascript.
When we have any asynchronus code that tries to access the object patterns, we run into issues with javascript `this` issue.
Ex:
var harry = { 'name': 'harry',
'greet' : function(){console.log('Hello ' + this.name)},
'print' : function(){
// using setTimeout, it can be any async function
setTimeout(this.greet, 1000); // this will fail!
}
/**
* This is a script to solve Yahoo bingo problem through
* websockets. http://yahoobingo.herokuapp.com/
*
* @author harry_sistalam
*/
var YAHOO_BINGO_URL = 'ws://yahoobingo.herokuapp.com';
var user_obj = {name : 'harry_sistalam',
email : 'sriharsha.sm@gmail.com',
@harry1989
harry1989 / README.md
Created May 26, 2012 06:31 — forked from harry1989/birth_day_thank_you.py
Thanking friends who wishes for your birthday
@harry1989
harry1989 / birth_day_thank_you.py
Created May 25, 2012 13:03
Thanking people who wished for your birthday
# these needs to be entered
oath_token=''
birth_date=''
birth_day_messages = ["happy", "b'day","birthday", "bday"]
from facepy import GraphAPI