Skip to content

Instantly share code, notes, and snippets.

@sramanujan
Created February 6, 2014 18:41
Show Gist options
  • Select an option

  • Save sramanujan/8850092 to your computer and use it in GitHub Desktop.

Select an option

Save sramanujan/8850092 to your computer and use it in GitHub Desktop.
funny things...
info: validated meta=id=524740442 name=Srinath Ramanujan
RADS this was the thing [ ] and key was 0
RADS this was the thing [ ] and key was 1
RADS this was the thing [ ] and key was 2
RADS this was the thing [ ] and key was 3
RADS this was the thing [ ] and key was 4
RADS this was the thing [ ] and key was 5
RADS this was the thing [ ] and key was 6
RADS this was the thing [ ] and key was 100
RADS this was the thing [ ] and key was 101
RADS this was the thing function () {
return this.get(path);
} and key was toObject
RADS this was the thing { strictMode: true,
selected: undefined,
shardval: undefined,
saveError: undefined,
validationError: undefined,
adhocPaths: undefined,
removing: undefined,
inserting: undefined,
version: undefined,
getters:
{ powerups:
{ freecell: 5,
freecoins: 4,
doublexp: 0,
freecash: 0,
twofreecells: 5,
freekey: 0,
instantbingo: 0,
bomb: 0,
doublepayout: 5 },
chests_opened:
{ '0': [ ],
'1': [ ],
'2': [ ],
'3': [ ],
'4': [ ],
'5': [ ],
'6': [ ],
'100': [ ],
'101': [ ] } },
_id: undefined,
populate: undefined,
populated: undefined,
wasPopulated: false,
scope:
{ __v: 0,
_id: 52f3cf64e263410a33000001,
access_token: 'cf8afec044afdf7e0b85c32308644dfb98bfd2f2',
current_device_id: '27BDA284-1C2E-4B6F-98DD-F93A24AF194D',
dailyloginbonus_last_collected_at: Thu Feb 06 2014 23:37:32 GMT+0530 (IST),
id: 7535801,
last_spam_sent_ts: Thu Feb 06 2014 23:38:04 GMT+0530 (IST),
last_used_device_token: '',
sn_friend_list: [],
in_app_requests: [],
in_app_friend_list: [],
inbox_virals: [],
sent_virals_list: [],
purchase_token: '',
write_hmac_expiry: 1391731652135,
write_hmac_token: 'e8c1e8f7df2651068be751402a7ee97326fce7c1',
last_used_device_type: 2,
meta:
{ is_30day_payer: 0,
is_7day_payer: 0,
is_payer: 0,
games_finished: 0,
rooms_joined: 0,
cards_played: 0,
games_played: 0,
bingos_done: 0 },
last_dau_at: Thu Feb 06 2014 23:37:32 GMT+0530 (IST),
last_login_at: Thu Feb 06 2014 23:37:32 GMT+0530 (IST),
created_at: Thu Feb 06 2014 23:37:32 GMT+0530 (IST),
powerups:
{ doublepayout: 5,
bomb: 0,
instantbingo: 0,
freekey: 0,
twofreecells: 5,
freecash: 0,
doublexp: 0,
freecoins: 4,
freecell: 5 },
numTotalPowerups: -1,
level: 1,
xp: 28,
chests_opened:
{ '0': [],
'1': [],
'2': [],
'3': [],
'4': [],
'5': [],
'6': [],
'100': [],
'101': [] },
bingos:
{ '0': 1,
'1': 0,
'2': 0,
'3': 0,
'4': 0,
'5': 0,
'6': 0,
'100': 0,
'101': 0 },
keys:
{ '0': 0,
'1': 0,
'2': 0,
'3': 0,
'4': 0,
'5': 0,
'6': 0,
'100': 0,
'101': 0 },
ftues_completed: 0,
coins_paid: 0,
coins_free: 410,
chips_paid: 0,
chips_free: 32,
snuid: 0,
snid: 0 },
activePaths:
{ paths:
{ id: 'init',
snid: 'init',
snuid: 'init',
chips_free: 'init',
chips_paid: 'init',
coins_free: 'init',
coins_paid: 'init',
ftues_completed: 'init',
'keys.0': 'init',
'keys.1': 'init',
'keys.2': 'init',
'keys.3': 'init',
'keys.4': 'init',
'keys.5': 'init',
'keys.6': 'init',
'keys.100': 'init',
'keys.101': 'init',
'bingos.0': 'init',
'bingos.1': 'init',
'bingos.2': 'init',
'bingos.3': 'init',
'bingos.4': 'init',
'bingos.5': 'init',
'bingos.6': 'init',
'bingos.100': 'init',
'bingos.101': 'init',
'chests_opened.0': 'init',
'chests_opened.1': 'init',
'chests_opened.2': 'init',
'chests_opened.3': 'init',
'chests_opened.4': 'init',
'chests_opened.5': 'init',
'chests_opened.6': 'init',
'chests_opened.100': 'init',
'chests_opened.101': 'init',
xp: 'init',
level: 'init',
numTotalPowerups: 'init',
'powerups.freecell': 'init',
'powerups.freecoins': 'init',
'powerups.doublexp': 'init',
'powerups.freecash': 'init',
'powerups.twofreecells': 'init',
'powerups.freekey': 'init',
'powerups.instantbingo': 'init',
'powerups.bomb': 'init',
'powerups.doublepayout': 'init',
created_at: 'init',
last_login_at: 'init',
last_dau_at: 'init',
'meta.bingos_done': 'init',
'meta.games_played': 'init',
'meta.cards_played': 'init',
'meta.rooms_joined': 'init',
'meta.games_finished': 'init',
'meta.is_payer': 'init',
'meta.is_7day_payer': 'init',
'meta.is_30day_payer': 'init',
last_used_device_type: 'init',
write_hmac_token: 'init',
write_hmac_expiry: 'init',
purchase_token: 'init',
sent_virals_list: 'init',
inbox_virals: 'init',
in_app_friend_list: 'init',
in_app_requests: 'init',
sn_friend_list: 'init',
last_used_device_token: 'init',
last_spam_sent_ts: 'init',
dailyloginbonus_last_collected_at: 'init',
current_device_id: 'init',
access_token: 'init',
_id: 'init',
__v: 'init' },
states: { default: {}, init: [Object], modify: {}, require: {} },
stateNames: [ 'require', 'modify', 'init', 'default' ] },
ownerDocument: undefined,
fullPath: undefined } and key was $__
RADS this was the thing false and key was isNew
RADS this was the thing undefined and key was errors
RADS this was the thing 0 and key was _maxListeners
RADS this was the thing function (type, listener) {
var m;
if (typeof listener !== 'function')
throw TypeError('listener must be a function');
if (!this._events)
this._events = {};
// To avoid recursion in the case that type === "newListener"! Before
// adding it to the listeners, first emit "newListener".
if (this._events.newListener)
this.emit('newListener', type, typeof listener.listener === 'function' ?
listener.listener : listener);
if (!this._events[type])
// Optimize the case of one listener. Don't need the extra array object.
this._events[type] = listener;
else if (typeof this._events[type] === 'object')
// If we've already got an array, just append.
this._events[type].push(listener);
else
// Adding the second element, need to change to array.
this._events[type] = [this._events[type], listener];
// Check for listener leak
if (typeof this._events[type] === 'object' && !this._events[type].warned) {
m = this._maxListeners;
if (m && m > 0 && this._events[type].length > m) {
this._events[type].warned = true;
console.error('(node) warning: possible EventEmitter memory ' +
'leak detected. %d listeners added. ' +
'Use emitter.setMaxListeners() to increase limit.',
this._events[type].length);
console.trace();
}
}
return this;
} and key was addListener
RADS this was the thing function (type, listener) {
var m;
if (typeof listener !== 'function')
throw TypeError('listener must be a function');
if (!this._events)
this._events = {};
// To avoid recursion in the case that type === "newListener"! Before
// adding it to the listeners, first emit "newListener".
if (this._events.newListener)
this.emit('newListener', type, typeof listener.listener === 'function' ?
listener.listener : listener);
if (!this._events[type])
// Optimize the case of one listener. Don't need the extra array object.
this._events[type] = listener;
else if (typeof this._events[type] === 'object')
// If we've already got an array, just append.
this._events[type].push(listener);
else
// Adding the second element, need to change to array.
this._events[type] = [this._events[type], listener];
// Check for listener leak
if (typeof this._events[type] === 'object' && !this._events[type].warned) {
m = this._maxListeners;
if (m && m > 0 && this._events[type].length > m) {
this._events[type].warned = true;
console.error('(node) warning: possible EventEmitter memory ' +
'leak detected. %d listeners added. ' +
'Use emitter.setMaxListeners() to increase limit.',
this._events[type].length);
console.trace();
}
}
return this;
} and key was on
RADS this was the thing function (type, listener) {
if (typeof listener !== 'function')
throw TypeError('listener must be a function');
var fired = false;
function g() {
this.removeListener(type, g);
if (!fired) {
fired = true;
listener.apply(this, arguments);
}
}
g.listener = listener;
this.on(type, g);
return this;
} and key was once
RADS this was the thing function (type, listener) {
var list, position, length, i;
if (typeof listener !== 'function')
throw TypeError('listener must be a function');
if (!this._events || !this._events[type])
return this;
list = this._events[type];
length = list.length;
position = -1;
if (list === listener ||
(typeof list.listener === 'function' && list.listener === listener)) {
delete this._events[type];
if (this._events.removeListener)
this.emit('removeListener', type, listener);
} else if (typeof list === 'object') {
for (i = length; i-- > 0;) {
if (list[i] === listener ||
(list[i].listener && list[i].listener === listener)) {
position = i;
break;
}
}
if (position < 0)
return this;
if (list.length === 1) {
list.length = 0;
delete this._events[type];
} else {
list.splice(position, 1);
}
if (this._events.removeListener)
this.emit('removeListener', type, listener);
}
return this;
} and key was removeListener
RADS this was the thing function (type) {
var key, listeners;
if (!this._events)
return this;
// not listening for removeListener, no need to emit
if (!this._events.removeListener) {
if (arguments.length === 0)
this._events = {};
else if (this._events[type])
delete this._events[type];
return this;
}
// emit removeListener for all listeners on all events
if (arguments.length === 0) {
for (key in this._events) {
if (key === 'removeListener') continue;
this.removeAllListeners(key);
}
this.removeAllListeners('removeListener');
this._events = {};
return this;
}
listeners = this._events[type];
if (typeof listeners === 'function') {
this.removeListener(type, listeners);
} else if (Array.isArray(listeners)) {
// LIFO order
while (listeners.length)
this.removeListener(type, listeners[listeners.length - 1]);
}
delete this._events[type];
return this;
} and key was removeAllListeners
RADS this was the thing function (type) {
var ret;
if (!this._events || !this._evefnts[type])
ret = [];
else if (typeof this._events[type] === 'function')
ret = [this._events[type]];
else
ret = this._events[type].slice();
return ret;
} and key was listeners
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment