Skip to content

Instantly share code, notes, and snippets.

View sivakumar-kailasam's full-sized avatar
:shipit:

Sivakumar Kailasam sivakumar-kailasam

:shipit:
View GitHub Profile
import $ from 'jquery';
// import Promise from 'rsvp';
import DS from 'ember-data';
export default DS.Adapter.extend({
findRecord(store, type, id, snapshot) {
return {'imgURL': 'New Img comes here'};
},
import Ember from 'ember';
var get = Ember.get;
var keys = Ember.keys;
var isNone = Ember.isNone;
/**
* Computed Property Macro returns computed property that evaluates to result of validation.
*
* It accepts rules hash which property name as keys and validation functions as values.
/*
Example usage:
import logger from "app/system/logger";
var LOG = logger.loggerFor("topic"');
LOG.log({
event: "data received",
secondary: {
resource: "photo",
// This code co-ordinates tabs from the same domain to elect one of them as a
// "master", and allow them to broadcast messages to each other.
function WindowController () {
var now = Date.now(),
ping = 0;
try {
ping = +localStorage.getItem( 'ping' ) || 0;
} catch ( error ) {}
if ( now - ping > 45000 ) {
this.becomeMaster();